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 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 ~  lm.fit.01 <- lm(formula = Sales ~ 
                  CompPrice + Income +                   CompPrice + Income + 
Line 1237: Line 1237:
                  data = Carseats)                  data = Carseats)
 summary(lm.fit.01) summary(lm.fit.01)
 +</code>
 +
 +<code>
 > lm.fit.01 <- lm(formula = Sales ~ CompPrice +  > lm.fit.01 <- lm(formula = Sales ~ CompPrice + 
          Income + Advertising + Price +           Income + Advertising + Price + 
Line 1266: Line 1269:
 Multiple R-squared:  0.872, Adjusted R-squared:  0.8697  Multiple R-squared:  0.872, Adjusted R-squared:  0.8697 
 F-statistic: 381.4 on 7 and 392 DF,  p-value: < 2.2e-16 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