1 / 10

From Anova to Regression: analyzing the effect on consumption of no. of persons in family

From Anova to Regression: analyzing the effect on consumption of no. of persons in family. Family consumption data family.dta. E/Albert/Courses/cdas/appstat00/From anova to regression. Histogram of the consumption data. . use "I:ade-ecoAPL_STATAs2002family.dta", clear

galvin-rose
Download Presentation

From Anova to Regression: analyzing the effect on consumption of no. of persons in family

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. From Anova to Regression: analyzing the effect on consumption of no. of persons in family Family consumption data family.dta E/Albert/Courses/cdas/appstat00/From anova to regression

  2. Histogram of the consumption data . use "I:\ade-eco\APL_STAT\As2002\family.dta", clear . graph exp1_1, bin(12) normal

  3. Log-transformation y = ln(food) generate lfood = ln(exp1_1) . graph lfood, bin(20) normal

  4. Power Transformation x --> x* x* = (xl - 1)/l x* = ln (x) when l = 0

  5. Box-Cox Transformation . boxcox exp1_1, nolog level(95) gen(newfood) Transform: (exp1_1^L-1)/L L [95% Conf. Interval] Log Likelihood ---------------------------------------------------- 0.3670 0.3382 0.4072 684.63356 Test: L == -1 chi2(1) = 47323.87 Pr>chi2 = 0.0000 L == 0 chi2(1) = 1141.84 Pr>chi2 = 0.0000 L == 1 chi2(1) = 910.66 Pr>chi2 = 0.0000 .

  6. Distrib. of transform. var.

  7. Comparison of distributions

  8. One-way ANOVA . oneway newfood nmemb_1, tabulate scheffe number | Summary of BC(exp1_1,.367) members | Mean Std. Dev. Freq. ------------+------------------------------------ 1 | -.54646644 .55918587 269 2 | .0042595 .55767657 612 3 | .30043252 .55347515 589 4 | .50565614 .58054826 675 5 | .64489038 .54040512 307 6 | .89943188 .54306837 126 7 | 1.0034046 .7149304 42 8 | 1.4943582 1.0579128 12 9 | 1.2014463 .37134539 6 10 | 1.7167094 0 1 11 | 1.6762753 0 1 ------------+------------------------------------ Total | .28631315 .68660233 2640 Analysis of Variance Source SS df MS F Prob > F ------------------------------------------------------------------------ Between groups 402.78829 10 40.278829 125.87 0.0000 Within groups 841.296369 2629 .320006226 ------------------------------------------------------------------------ Total 1244.08466 2639 .471422758 -

  9. Regression . regress newfood nmemb_1 Source | SS df MS Number of obs = 2640 ---------+------------------------------ F( 1, 2638) = 1126.51 Model | 372.28551 1 372.28551 Prob > F = 0.0000 Residual | 871.799149 2638 .330477312 R-squared = 0.2992 ---------+------------------------------ Adj R-squared = 0.2990 Total | 1244.08466 2639 .471422758 Root MSE = .57487 ------------------------------------------------------------------------------ newfood | Coef. Std. Err. t P>|t| [95% Conf. Interval] ---------+-------------------------------------------------------------------- nmemb_1 | .2536583 .0075576 33.563 0.000 .2388389 .2684777 _cons | -.5511436 .0273451 -20.155 0.000 -.6047636 -.4975236 ------------------------------------------------------------------------------ .

  10. Regression fitgraph yhat newfood nmemb_1, c(s.) s(iO)

More Related