multiple_regression_examples
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
multiple_regression_examples [2018/11/09 11:58] – [Regression] hkimscil | multiple_regression_examples [2019/11/01 12:30] – [e.g.,] hkimscil | ||
---|---|---|---|
Line 110: | Line 110: | ||
x3 work ethic | x3 work ethic | ||
</ | </ | ||
+ | from the above output: | ||
| x | zero-order cor | part cor | squared zero-order cor | squared part cor | shared square cor | | | x | zero-order cor | part cor | squared zero-order cor | squared part cor | shared square cor | | ||
| x1 | .764 | .588 | 0.583696 | | x1 | .764 | .588 | 0.583696 | ||
| x2 | .769 | .594 | 0.591361 | | x2 | .769 | .594 | 0.591361 | ||
- | note that the values of two raws at the last column are similar. | + | note that the values of two raws at the last column are similar. |
$$ \hat{Y_{i}} = 101.222 + 1.000X1_{i} + 1.071X2_{i} $$ | $$ \hat{Y_{i}} = 101.222 + 1.000X1_{i} + 1.071X2_{i} $$ | ||
Line 608: | Line 609: | ||
| | ||
</ | </ | ||
+ | |||
+ | ====== e.g., ====== | ||
+ | < | ||
+ | > stepAIC(lm.full) | ||
+ | Start: | ||
+ | Sales ~ CompPrice + Income + Advertising + Population + Price + | ||
+ | ShelveLoc + Age + Education + Urban + US | ||
+ | |||
+ | Df Sum of Sq | ||
+ | - Population | ||
+ | - Education | ||
+ | - Urban 1 1.23 404.06 | ||
+ | - US | ||
+ | < | ||
+ | - Income | ||
+ | - Advertising | ||
+ | - Age 1 217.44 | ||
+ | - CompPrice | ||
+ | - ShelveLoc | ||
+ | - Price 1 | ||
+ | |||
+ | Step: AIC=25.15 | ||
+ | Sales ~ CompPrice + Income + Advertising + Price + ShelveLoc + | ||
+ | Age + Education + Urban + US | ||
+ | |||
+ | Df Sum of Sq | ||
+ | - Urban 1 1.15 404.31 | ||
+ | - Education | ||
+ | - US | ||
+ | < | ||
+ | - Income | ||
+ | - Advertising | ||
+ | - Age 1 218.52 | ||
+ | - CompPrice | ||
+ | - ShelveLoc | ||
+ | - Price 1 | ||
+ | |||
+ | Step: AIC=24.29 | ||
+ | Sales ~ CompPrice + Income + Advertising + Price + ShelveLoc + | ||
+ | Age + Education + US | ||
+ | |||
+ | Df Sum of Sq | ||
+ | - Education | ||
+ | - US | ||
+ | < | ||
+ | - Income | ||
+ | - Advertising | ||
+ | - Age 1 217.59 | ||
+ | - CompPrice | ||
+ | - ShelveLoc | ||
+ | - Price 1 | ||
+ | |||
+ | Step: AIC=23.72 | ||
+ | Sales ~ CompPrice + Income + Advertising + Price + ShelveLoc + | ||
+ | Age + US | ||
+ | |||
+ | Df Sum of Sq | ||
+ | - US | ||
+ | < | ||
+ | - Income | ||
+ | - Advertising | ||
+ | - Age 1 217.97 | ||
+ | - CompPrice | ||
+ | - ShelveLoc | ||
+ | - Price 1 | ||
+ | |||
+ | Step: AIC=23.32 | ||
+ | Sales ~ CompPrice + Income + Advertising + Price + ShelveLoc + | ||
+ | Age | ||
+ | |||
+ | Df Sum of Sq | ||
+ | < | ||
+ | - Income | ||
+ | - Age 1 219.12 | ||
+ | - Advertising | ||
+ | - CompPrice | ||
+ | - ShelveLoc | ||
+ | - Price 1 | ||
+ | |||
+ | Call: | ||
+ | lm(formula = Sales ~ CompPrice + Income + Advertising + Price + | ||
+ | ShelveLoc + Age, data = Carseats) | ||
+ | |||
+ | Coefficients: | ||
+ | (Intercept) | ||
+ | 5.47523 | ||
+ | Price ShelveLocGood | ||
+ | | ||
+ | |||
+ | > | ||
+ | </ | ||
+ | |||
+ | |||
+ | <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: | ||
+ | |||
+ | 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: | ||
+ | |||
+ | 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: | ||
+ | |||
+ | 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: | ||
+ | |||
+ | 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: | ||
+ | |||
+ | 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: | ||
+ | |||
+ | 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 | ||
+ | </ |
multiple_regression_examples.txt · Last modified: 2023/10/21 13:26 by hkimscil