User Tools

Site Tools


r:dummy_variables_with_significant_interaction

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
r:dummy_variables_with_significant_interaction [2023/06/05 21:58] – [Regression with a continous + a categorical variables: ANCOVA] hkimscilr:dummy_variables_with_significant_interaction [2023/06/05 22:01] (current) – [Regression with a continous + a categorical variables: ANCOVA] hkimscil
Line 207: Line 207:
     * y hat ~ 77.3 + .00006*cost     * y hat ~ 77.3 + .00006*cost
  
 +<code>
 +> summary(mod2<-lm(salary~cost * location))
  
 +Call:
 +lm(formula = salary ~ cost * location)
  
 +Residuals:
 +     Min       1Q   Median       3Q      Max 
 +-17.1126  -5.6241  -0.8152   2.6401  28.4861 
 +
 +Coefficients:
 +                  Estimate Std. Error t value Pr(>|t|)    
 +(Intercept)      8.863e+01  4.995e+00  17.744   <2e-16 ***
 +cost             5.480e-05  3.211e-05   1.707   0.0919 .  
 +locationMW      -5.526e+00  7.213e+00  -0.766   0.4460    
 +locationNE      -2.866e+00  7.383e+00  -0.388   0.6989    
 +locationW       -1.876e+00  6.509e+00  -0.288   0.7740    
 +cost:locationMW  1.885e-05  4.681e-05   0.403   0.6882    
 +cost:locationNE  7.480e-05  4.533e-05   1.650   0.1030    
 +cost:locationW  -7.815e-05  4.665e-05  -1.675   0.0980 .  
 +---
 +Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
 +
 +Residual standard error: 7.644 on 77 degrees of freedom
 +Multiple R-squared:  0.6241, Adjusted R-squared:  0.5899 
 +F-statistic: 18.26 on 7 and 77 DF,  p-value: 4.313e-14
 +
 +> anova(mod2)
 +Analysis of Variance Table
 +
 +Response: salary
 +              Df Sum Sq Mean Sq F value    Pr(>F)    
 +cost           1 2757.0 2756.97  47.183 1.470e-09 ***
 +location       3 4071.8 1357.26  23.228 8.276e-11 ***
 +cost:location  3  641.6  213.86   3.660   0.01596 *  
 +Residuals     77 4499.2   58.43                      
 +---
 +Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
 +
 +</code>
  
  
r/dummy_variables_with_significant_interaction.1685969932.txt.gz · Last modified: 2023/06/05 21:58 by hkimscil

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki