hat wer die aufgabe mit cars gmacht?
also, ich habe die Aufgabe 1 so gemacht:
gen heightchild_cm=heightchild*2.54
gen midheightp_cm=midheightp*2.54
scatter heightchild_cm midheightp_cm
correlate heightchild_cm midheightp_cm
scatter heightchild_cm midheightp_cm ||lfit heightchild_cm midheightp_cm
regress heightchild_cm midheightp_cm
zum Schluss kriegst du so eine Tabelle:
Source | SS df MS Number of obs = 928
-------------+------------------------------ F( 1, 926) = 246.84
Model | 7980.20059 1 7980.20059 Prob > F = 0.0000
Residual | 29937.1792 926 32.3295671 R-squared = 0.2105
-------------+------------------------------ Adj R-squared = 0.2096
Total | 37917.3798 927 40.9033223 Root MSE = 5.6859
------------------------------------------------------------------------------
heightchil~m | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
midheightp~m | .6462903 .0411359 15.71 0.000 .56556 .7270207
_cons | 60.81152 7.139629 8.52 0.000 46.79979 74.82325
------------------------------------------------------------------------------
Jetzt bestimmen wir die Regressionsgerade
Also, die klassische Gleichung y=k*x+d
=>Regressionsgerade Y = 0.65*midheightp~m+60.8
genau so muss man bei anscombe's Variablen machen
du bekommst ja dann diese tabelle:
regress dist speed
Source SS df MS Number of obs = 50
F( 1, 4= 89.57
Model 21185.4589 1 21185.4589 Prob > F = 0.0000
Residual 11353.5211 48 236.531689 R-squared = 0.6511
Adj R-squared = 0.6438
Total 32538.98 49 664.060816 Root MSE = 15.38
dist Coef. Std. Err. t P>t [95% Conf. Interval]
speed 3.932409 .4155128 9.46 0.000 3.096964 4.767853
_cons -17.57909 6.75844 -2.60 0.012 -31.16785 -3.99034
dann sind die Schätzer ß0 = -17.57909 und ß1 = 3.932409
Damit kannst du dann auch die Regressionsgerade bestimmen:
ß0+ß1*speed = -17.57909 + 3.932409 *speed = dist
Lesezeichen