6. 6 . <- Add Extra Rows with Missing Dependent Variable

6. 6 . <- Add Extra Rows with Missing Dependent Variable

<p>. list</p><p>+------+ | var1 var2 | |------| 1. | 1 2 | 2. | 2 3 | 3. | 3 3 | 4. | 4 7 | 5. | 5 10 | |------| 6. | 6 . |<- add extra rows with missing dependent variable 7. | 7 . |<- estimates, predictions and standard errors will be computed for +------+<- each value of ‘var1’ using the model with the complete data</p><p>. regr var2 var1</p><p>Source | SS df MS Number of obs = 5 ------+------F( 1, 3) = 20.00 Model | 40 1 40 Prob > F = 0.0208 Residual | 6 3 2 R-squared = 0.8696 ------+------Adj R-squared = 0.8261 Total | 46 4 11.5 Root MSE = 1.4142</p><p>------var2 | Coef. Std. Err. t P>|t| [95% Conf. Interval] ------+------var1 | 2 .4472136 4.47 0.021 .5767667 3.423233 _cons | -1 1.48324 -0.67 0.548 -5.720331 3.720331 ------</p><p>. predict yhat (option xb assumed; fitted values)</p><p>. predict see,stdp <- the stdp option computes standard error of estimation (for CIs)</p><p>. predict sep,stdf <- the stdf option computes standard error of prediction (for PIs)</p><p>. list</p><p>+------+ | var1 var2 yhat see sep | |------| 1. | 1 2 1 1.095445 1.788854 | 2. | 2 3 3 .7745967 1.612452 | 3. | 3 3 5 .6324555 1.549193 | 4. | 4 7 7 .7745967 1.612452 | 5. | 5 10 9 1.095445 1.788854 | |------| 6. | 6 . 11 1.48324 2.04939 | 7. | 7 . 13 1.897367 2.366432 | +------+ . insheet using "C:\Mdsc643.01\Fall 2003\sleuth\CASE0802.csv" (3 vars, 76 obs)</p><p>. desc</p><p>Contains data obs: 76 vars: 3 size: 1,216 (99.9% of memory free) ------storage display value variable name type format label variable label ------time float %9.0g TIME voltage byte %8.0g VOLTAGE group str7 %9s GROUP ------Sorted by: Note: dataset has changed since last saved</p><p>. encode group,gen(gr)</p><p>. regr time voltage</p><p>Source | SS df MS Number of obs = 76 ------+------F( 1, 74) = 24.27 Model | 2150408.26 1 2150408.26 Prob > F = 0.0000 Residual | 6557345.28 74 88612.774 R-squared = 0.2470 ------+------Adj R-squared = 0.2368 Total | 8707753.53 75 116103.38 Root MSE = 297.68</p><p>------time | Coef. Std. Err. t P>|t| [95% Conf. Interval] ------+------voltage | -53.95492 10.95264 -4.93 0.000 -75.77853 -32.13131 _cons | 1886.169 364.4812 5.17 0.000 1159.925 2612.414 ------</p><p>. browse</p><p>. onew time gr</p><p>Analysis of Variance Source SS df MS F Prob > F ------Between groups 5082509.89 6 847084.982 16.12 0.0000 Within groups 3625243.64 69 52539.7629 ------Total 8707753.53 75 116103.38</p><p>Bartlett's test for equal variances: chi2(6) = 299.5126 Prob>chi2 = 0.000</p><p>. gen lt=log(time)</p><p>. one lt group</p><p>Analysis of Variance Source SS df MS F Prob > F ------Between groups 196.477407 6 32.7462344 13.00 0.0000 Within groups 173.748925 69 2.51810036 ------Total 370.226332 75 4.93635109</p><p>Bartlett's test for equal variances: chi2(6) = 14.6789 Prob>chi2 = 0.023 . regr lt voltage</p><p>Source | SS df MS Number of obs = 76 ------+------F( 1, 74) = 78.14 Model | 190.151492 1 190.151492 Prob > F = 0.0000 Residual | 180.07484 74 2.43344378 R-squared = 0.5136 ------+------Adj R-squared = 0.5070 Total | 370.226332 75 4.93635109 Root MSE = 1.5599</p><p>------lt | Coef. Std. Err. t P>|t| [95% Conf. Interval] ------+------voltage | -.5073649 .057396 -8.84 0.000 -.6217289 -.393001 _cons | 18.95546 1.910019 9.92 0.000 15.14966 22.76125 ------</p><p>. anova lt voltage gr,continuous(voltage) sequential</p><p>Number of obs = 76 R-squared = 0.5307 Root MSE = 1.58685 Adj R-squared = 0.4899</p><p>Source | Seq. SS df MS F Prob > F ------+------Model | 196.477407 6 32.7462344 13.00 0.0000 | voltage | 190.151492 1 190.151492 75.51 0.0000 <- gr | 6.32591472 5 1.26518294 0.50 0.7734 <- | Residual | 173.748925 69 2.51810036 <- best estimate of variance ------+------Total | 370.226332 75 4.93635109 </p><p>.</p>

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    3 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us