STATA Tips 1

1. On a piece of code back

  pageup key

2. Descriptive statistics data
  • Quantitative data:

  SUM marize Variable Variable 1 Variable 2 ... n- (Double click variables can be obtained by a variable window)

  obs: number of samples

  mean: the average

  std.dev:. standard deviation

SUM marize Variable Variable 1 Variable 2 ... n-, D (add several analysis amount)

 

  • Qualitative data :( numbers represent some kind of nature / character)

Tab ulate variable name, Gen (A) - Returns a frequency distribution table corresponding to this variable, dummy variable and generates a corresponding (beginning with A)

 

3. Return Statement

REG R & lt ESS Y X1 X2 ... XK (default OLS: ordinary least squares estimation)

 

  • If it is qualitative variables, it is necessary to use dummies can not use variable names.
4. Install new statements do not add replace

ssc install reg2docx

The standardized regression statement

regress y x1 x2 … xk,beta

  • The larger the absolute value of the normalization factor, the larger factors

6. generate a new variable , in order to build the model. (Also available pre-Excel)

generate lny = log (evaluation value) 

generate price_square = 2 ^ Tuangou Jia Yuan

generate interaction_term = Tuangou Jia Yuan * Gross Weight kg

 

7. clear screen command

  cld

8. The rvfplot function

  Draw a scatter plot residuals and fitted values ​​(residual = true value - the predicted value)

  rvfplot

9. The rvpplot function

  画残差与自变量x的散点图

  rvpplot x 

Guess you like

Origin www.cnblogs.com/Zannier/p/12302584.html