using_dummy_variables
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
using_dummy_variables [2018/05/14 09:01] – [2 variables, categorical] hkimscil | using_dummy_variables [2019/10/18 10:18] (current) – hkimscil | ||
---|---|---|---|
Line 2: | Line 2: | ||
===== 2 groups ===== | ===== 2 groups ===== | ||
data: | data: | ||
- | {{: | + | {{: |
- | {{elemapi2_categories.sps}} | + | {{:elemapi2_categories.sps}} |
+ | |||
+ | {{: | ||
+ | in r < | ||
< | < | ||
Line 107: | Line 110: | ||
만약에 ANOVA 테스트에서와 같이 종류가 3개 이상인 변인은 어떻게 처리해야 할까? 아래는 이를 regression으로 테스트 한 결과이다. | 만약에 ANOVA 테스트에서와 같이 종류가 3개 이상인 변인은 어떻게 처리해야 할까? 아래는 이를 regression으로 테스트 한 결과이다. | ||
- | < | + | < |
- | Model R R Square Adjusted R Square Std. Error of the Estimate | + | > mod2 <- lm(api00 ~ factor(mealcat), |
- | 1 .867a .752 .752 70.908 | + | > mod2 |
- | a. Predictors: | + | |
+ | Call: | ||
+ | lm(formula = api00 ~ factor(mealcat), | ||
+ | |||
+ | Coefficients: | ||
+ | | ||
+ | | ||
+ | |||
+ | > summary(mod2) | ||
+ | |||
+ | Call: | ||
+ | lm(formula = api00 ~ factor(mealcat), | ||
+ | |||
+ | Residuals: | ||
+ | | ||
+ | -253.394 | ||
+ | |||
+ | Coefficients: | ||
+ | | ||
+ | (Intercept) | ||
+ | factor(mealcat)2 -166.324 8.708 -19.10 | ||
+ | factor(mealcat)3 -301.338 | ||
+ | --- | ||
+ | Signif. codes: | ||
- | ANOVA(b) | + | Residual standard error: 70.61 on 397 degrees |
- | Model Sum | + | Multiple R-squared: |
- | 1 Regression 6072527.519 1 6072527.519 1207.742 .000a | + | F-statistic: |
- | Residual 2001144.479 398 5028.001 | + | |
- | Total 8073671.997 399 | + | |
- | a. Predictors: (Constant), Percentage free meals in 3 categories | + | |
- | b. Dependent Variable: api 2000 | + | |
- | Coefficients(a) | + | > |
- | Unstandardized Coefficients Standardized Coefficients | + | |
- | Model B Std. Error Beta t Sig. | + | |
- | 1 (Constant) 950.987 9.422 100.935 .000 | + | |
- | Percentage of -150.553 4.332 -.867 -34.753 .000 | + | |
- | free meals in | + | |
- | 3 categories | + | |
- | a. Dependent Variable: api 2000 | + | |
</ | </ | ||
using_dummy_variables.1526256089.txt.gz · Last modified: 2018/05/14 09:01 by hkimscil