






Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!







prof
prof
prof prof prof
prof
prof
prof
profprof
prof
prof
prof (^) prof prof prof
prof
prof
prof
prof
prof
prof
prof
prof
prof
prof
prof bc
prof
prof
wc
prof
NA wc
wc wc
wc wc
wc wc wc wc
wc wc (^) wc
wcwc
wc wc
wc
wc
wc NA
bc
wc wc
wc
bc bc
bc
bc
bc
NA
NAbcbc bc bc
bc
bc
bcbc
bc
bc bc
bc bc bc bc bc bc bc
bc
bc
bc
bc
bc
bc bc
bc
bcbc bc
bc
bc
prof
bc
bc bc bc
bc
bc
0
5000
10000
15000
20000
25000
income
6 8 10 12 14 16 education
twoway (scatter income education if type=="bc", mcolor(red) msymbol(circle_hollow)) (scatter income education if type=="prof", mcolor(midgreen) msymbol(triangle_hollow)) (scatter income education if type=="wc", mcolor(blue) msymbol(plus)), legend(off)
0
5000
10000
15000
20000
25000
income
6 8 10 12 14 16 education
. reg prestige education
Source | SS df MS Number of obs = 102 -------------+------------------------------ F( 1, 100) = 260. Model | 21608.4361 1 21608.4361 Prob > F = 0. Residual | 8286.99 100 82.8699 R-squared = 0. -------------+------------------------------ Adj R-squared = 0. Total | 29895.4261 101 295.994318 Root MSE = 9.
prestige | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- education | 5.360878 .3319882 16.15 0.000 4.702223 6. _cons | -10.73198 3.677088 -2.92 0.004 -18.02722 -3.
4
6
8
10
12
(^4 6 8) x 10 12 14
y1 Fitted values
2
4
6
8
10
4 6 8 10 12 14 x y2 Fitted values
4
6
8
10
12
4 6 8 10 12 14 x y3 Fitted values
. reg weight height
Source | SS df MS Number of obs = 200 -------------+------------------------------ F( 1, 198) = 7. Model | 1630.88712 1 1630.88712 Prob > F = 0. Residual | 43713.1129 198 220.773297 R-squared = 0. -------------+------------------------------ Adj R-squared = 0. Total | 45344 199 227.859296 Root MSE = 14.
weight | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- height | .2384059 .0877159 2.72 0.007 .0654286. _cons | 25.26623 14.95042 1.69 0.093 -4.216263 54.
. reg weight height if id~=
Source | SS df MS Number of obs = 199 -------------+------------------------------ F( 1, 197) = 288. Model | 20941.4871 1 20941.4871 Prob > F = 0. Residual | 14312.0205 197 72.6498502 R-squared = 0. -------------+------------------------------ Adj R-squared = 0. Total | 35253.5075 198 178.048018 Root MSE = 8.
weight | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- height | 1.149222 .0676889 16.98 0.000 1.015734 1. _cons | -130.747 11.56271 -11.31 0.000 -153.5496 -107.
Extra Material:
As we saw with “histogram infant, kdensity”, you can add options after a command with a comma. Here is an option that may be used with the “reg” command: beta. “beta asks that standardized beta coefficients be reported instead of confidence intervals. The beta coefficients are the regression coefficients obtained by first standardizing all variables to have a mean of 0 and a standard deviation of 1. beta may not be specified with vce(cluster clustvar) or the svy prefix.” Here is how you use it, and what it does:
. reg prestige education, beta
Source | SS df MS Number of obs = 102 -------------+------------------------------ F( 1, 100) = 260. Model | 21608.4361 1 21608.4361 Prob > F = 0. Residual | 8286.99 100 82.8699 R-squared = 0. -------------+------------------------------ Adj R-squared = 0. Total | 29895.4261 101 295.994318 Root MSE = 9.
prestige | Coef. Std. Err. t P>|t| Beta -------------+---------------------------------------------------------------- education | 5.360878 .3319882 16.15 0.000. _cons | -10.73198 3.677088 -2.92 0..