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:22] – [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 +  
-cf. +            Advertising + Price +  
-<code> +            ShelveLoc + Age, data = Carseats) 
-lm.fit.01 <- lm(Sales ~ CompPrice + Income + Advertising + Price + ShelveLoc + Age, data = Carseats)+             
 +summary(lm.fit.be)
 </code> </code>
  
 <code> <code>
-> lm.fit.be <- lm(Sales ~ CompPrice + Income + Advertising + Price + ShelveLoc + Age, data = Carseats)+> lm.fit.be <- lm(Sales ~ CompPrice +  
 +        Income + Advertising +  
 +        Price + ShelveLoc +  
 +        Age, data = Carseats)
 > summary(lm.fit.be) > summary(lm.fit.be)
  
Line 1231: Line 1235:
  
 <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 1242:
                  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 1274:
 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