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 [2018/11/09 12:00] hkimscilmultiple_regression_examples [2019/11/01 12:30] – [e.g.,] hkimscil
Line 609: Line 609:
          
 </code> </code>
 +
 +====== e.g., ======
 +<code>
 +> stepAIC(lm.full)
 +Start:  AIC=26.82
 +Sales ~ CompPrice + Income + Advertising + Population + Price + 
 +    ShelveLoc + Age + Education + Urban + US
 +
 +              Df Sum of Sq     RSS    AIC
 +- Population        0.33  403.16  25.15
 +- Education    1      1.19  404.02  26.00
 +- Urban        1      1.23  404.06  26.04
 +- US                1.57  404.40  26.38
 +<none>                      402.83  26.82
 +- Income           76.16  478.99  94.09
 +- Advertising  1    127.14  529.97 134.54
 +- Age          1    217.44  620.27 197.48
 +- CompPrice    1    519.91  922.74 356.35
 +- ShelveLoc    2   1053.20 1456.03 536.80
 +- Price        1   1323.23 1726.06 606.85
 +
 +Step:  AIC=25.15
 +Sales ~ CompPrice + Income + Advertising + Price + ShelveLoc + 
 +    Age + Education + Urban + US
 +
 +              Df Sum of Sq     RSS    AIC
 +- Urban        1      1.15  404.31  24.29
 +- Education    1      1.36  404.52  24.49
 +- US                1.89  405.05  25.02
 +<none>                      403.16  25.15
 +- Income           75.94  479.10  92.18
 +- Advertising  1    145.38  548.54 146.32
 +- Age          1    218.52  621.68 196.38
 +- CompPrice    1    521.69  924.85 355.27
 +- ShelveLoc    2   1053.18 1456.34 534.89
 +- Price        1   1323.51 1726.67 605.00
 +
 +Step:  AIC=24.29
 +Sales ~ CompPrice + Income + Advertising + Price + ShelveLoc + 
 +    Age + Education + US
 +
 +              Df Sum of Sq     RSS    AIC
 +- Education    1      1.44  405.76  23.72
 +- US                1.85  406.16  24.12
 +<none>                      404.31  24.29
 +- Income           76.64  480.96  91.73
 +- Advertising  1    146.03  550.34 145.63
 +- Age          1    217.59  621.91 194.53
 +- CompPrice    1    526.17  930.48 355.69
 +- ShelveLoc    2   1053.93 1458.25 533.41
 +- Price        1   1322.80 1727.11 603.10
 +
 +Step:  AIC=23.72
 +Sales ~ CompPrice + Income + Advertising + Price + ShelveLoc + 
 +    Age + US
 +
 +              Df Sum of Sq     RSS    AIC
 +- US                1.63  407.39  23.32
 +<none>                      405.76  23.72
 +- Income           77.87  483.62  91.94
 +- Advertising  1    145.30  551.06 144.15
 +- Age          1    217.97  623.73 193.70
 +- CompPrice    1    525.25  931.00 353.92
 +- ShelveLoc    2   1056.88 1462.64 532.61
 +- Price        1   1322.83 1728.58 601.44
 +
 +Step:  AIC=23.32
 +Sales ~ CompPrice + Income + Advertising + Price + ShelveLoc + 
 +    Age
 +
 +              Df Sum of Sq     RSS    AIC
 +<none>                      407.39  23.32
 +- Income           76.68  484.07  90.30
 +- Age          1    219.12  626.51 193.48
 +- Advertising  1    234.03  641.42 202.89
 +- CompPrice    1    523.83  931.22 352.01
 +- ShelveLoc    2   1055.51 1462.90 530.68
 +- Price        1   1324.42 1731.81 600.18
 +
 +Call:
 +lm(formula = Sales ~ CompPrice + Income + Advertising + Price + 
 +    ShelveLoc + Age, data = Carseats)
 +
 +Coefficients:
 +    (Intercept)        CompPrice           Income      Advertising  
 +        5.47523          0.09257          0.01578          0.11590  
 +          Price    ShelveLocGood  ShelveLocMedium              Age  
 +       -0.09532          4.83567          1.95199         -0.04613  
 +
 +
 +</code>
 +
 +
 +<WRAP col2>
 +The Carseats data set tracks sales information for car seats. It has 400 observations (each at a different store) and 11 variables:
 +
 +Sales: unit sales in thousands
 +
 +CompPrice: price charged by competitor at each location
 +
 +Income: community income level in 1000s of dollars
 +
 +Advertising: local ad budget at each location in 1000s of dollars
 +
 +Population: regional pop in thousands
 +
 +Price: price for car seats at each site
 +
 +ShelveLoc: Bad, Good or Medium indicates quality of shelving location
 +
 +Age: age level of the population
 +
 +Education: ed level at location
 +
 +Urban: Yes/No
 +
 +US: Yes/NoThe Carseats data set tracks sales information for car seats. It has 400 observations (each at a different store) and 11 variables:
 +
 +Sales: unit sales in thousands
 +
 +CompPrice: price charged by competitor at each location
 +
 +Income: community income level in 1000s of dollars
 +
 +Advertising: local ad budget at each location in 1000s of dollars
 +
 +Population: regional pop in thousands
 +
 +Price: price for car seats at each site
 +
 +ShelveLoc: Bad, Good or Medium indicates quality of shelving location
 +
 +Age: age level of the population
 +
 +Education: ed level at location
 +
 +Urban: Yes/No
 +
 +US: Yes/No
 +The Carseats data set tracks sales information for car seats. It has 400 observations (each at a different store) and 11 variables:
 +
 +Sales: unit sales in thousands
 +
 +CompPrice: price charged by competitor at each location
 +
 +Income: community income level in 1000s of dollars
 +
 +Advertising: local ad budget at each location in 1000s of dollars
 +
 +Population: regional pop in thousands
 +
 +Price: price for car seats at each site
 +
 +ShelveLoc: Bad, Good or Medium indicates quality of shelving location
 +
 +Age: age level of the population
 +
 +Education: ed level at location
 +
 +Urban: Yes/No
 +
 +US: Yes/No
 +The Carseats data set tracks sales information for car seats. It has 400 observations (each at a different store) and 11 variables:
 +
 +Sales: unit sales in thousands
 +
 +CompPrice: price charged by competitor at each location
 +
 +Income: community income level in 1000s of dollars
 +
 +Advertising: local ad budget at each location in 1000s of dollars
 +
 +Population: regional pop in thousands
 +
 +Price: price for car seats at each site
 +
 +ShelveLoc: Bad, Good or Medium indicates quality of shelving location
 +
 +Age: age level of the population
 +
 +Education: ed level at location
 +
 +Urban: Yes/No
 +
 +US: Yes/No
 +The Carseats data set tracks sales information for car seats. It has 400 observations (each at a different store) and 11 variables:
 +
 +Sales: unit sales in thousands
 +
 +CompPrice: price charged by competitor at each location
 +
 +Income: community income level in 1000s of dollars
 +
 +Advertising: local ad budget at each location in 1000s of dollars
 +
 +Population: regional pop in thousands
 +
 +Price: price for car seats at each site
 +
 +ShelveLoc: Bad, Good or Medium indicates quality of shelving location
 +
 +Age: age level of the population
 +
 +Education: ed level at location
 +
 +Urban: Yes/No
 +
 +US: Yes/No
 +The Carseats data set tracks sales information for car seats. It has 400 observations (each at a different store) and 11 variables:
 +
 +Sales: unit sales in thousands
 +
 +CompPrice: price charged by competitor at each location
 +
 +Income: community income level in 1000s of dollars
 +
 +Advertising: local ad budget at each location in 1000s of dollars
 +
 +Population: regional pop in thousands
 +
 +Price: price for car seats at each site
 +
 +ShelveLoc: Bad, Good or Medium indicates quality of shelving location
 +
 +Age: age level of the population
 +
 +Education: ed level at location
 +
 +Urban: Yes/No
 +
 +US: Yes/No
 +</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