User Tools

Site Tools


multiple_regression_examples

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
multiple_regression_examples [2019/11/01 13:17] – [Backward elimination] hkimscilmultiple_regression_examples [2019/11/01 13:20] – [Backward elimination] hkimscil
Line 1190: Line 1190:
 <WRAP group> <WRAP group>
 <WRAP half column> <WRAP half column>
-<code>lm.fit.be <- lm(Sales ~ CompPrice + Income + Advertising + Price + ShelveLoc + Age, data = Carseats)</code> +<code>lm.fit.be <- lm(Sales ~ CompPrice +  
- +            Income + Advertising + Price +  
-cf. +            ShelveLoc + Age, data = Carseats) 
-<code> +summary(lm.fit.be)
-lm.fit.01 <- lm(Sales ~ CompPrice + Income + Advertising + Price + ShelveLoc + Age, data = Carseats)+
 </code> </code>
  
Line 1231: Line 1230:
  
 <WRAP half column> <WRAP half column>
 +<code>
 +lm.fit.01 <- lm(formula = Sales ~ 
 +                 CompPrice + Income + 
 +                 Advertising + Price + 
 +                 ShelveLoc + Age, 
 +                 data = Carseats)
 +summary(lm.fit.01)
 +</code>
  
 +<code>
 +> lm.fit.01 <- lm(formula = Sales ~ CompPrice + 
 +         Income + Advertising + Price + 
 +         ShelveLoc + Age, data = Carseats)
 +> summary(lm.fit.01)
 +
 +Call:
 +lm(formula = Sales ~ CompPrice + Income + Advertising + Price + 
 +    ShelveLoc + Age, data = Carseats)
 +
 +Residuals:
 +    Min      1Q  Median      3Q     Max 
 +-2.7728 -0.6954  0.0282  0.6732  3.3292 
 +
 +Coefficients:
 +                 Estimate Std. Error t value Pr(>|t|)    
 +(Intercept)      5.475226   0.505005   10.84   <2e-16 ***
 +CompPrice        0.092571   0.004123   22.45   <2e-16 ***
 +Income           0.015785   0.001838    8.59   <2e-16 ***
 +Advertising      0.115903   0.007724   15.01   <2e-16 ***
 +Price           -0.095319   0.002670  -35.70   <2e-16 ***
 +ShelveLocGood    4.835675   0.152499   31.71   <2e-16 ***
 +ShelveLocMedium  1.951993   0.125375   15.57   <2e-16 ***
 +Age             -0.046128   0.003177  -14.52   <2e-16 ***
 +---
 +Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
 +
 +Residual standard error: 1.019 on 392 degrees of freedom
 +Multiple R-squared:  0.872, Adjusted R-squared:  0.8697 
 +F-statistic: 381.4 on 7 and 392 DF,  p-value: < 2.2e-16
 +
 +</code>
 </WRAP> </WRAP>
 </WRAP> </WRAP>
multiple_regression_examples.txt · Last modified: 2023/10/21 13:26 by hkimscil

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki