Statistics/Computer Science:
With a given data set (X,Y) how and what is the code to use in R/Rstudio to receive these results (aka ANOVA)?
X=c(0.01,0.48,0.71,0.95,1.19,0.01,0.48,1.44,0.71,1.96,0.01,1.44,1.96)
Y=c(127.6,124,110.8,103.9,101.5,130.1,122,92.3,113.1,83.7,128,91.4,86.2)
## For intercept and slope
model=lm(Y~X)
summary(model)
#### For ANOVA table required for your
model.aov=aov(Y~X)
summary(model.aov)
#### Run
>
X=c(0.01,0.48,0.71,0.95,1.19,0.01,0.48,1.44,0.71,1.96,0.01,1.44,1.96)
>
>
Y=c(127.6,124,110.8,103.9,101.5,130.1,122,92.3,113.1,83.7,128,91.4,86.2)
>
> ## For intercept and slope
> model=lm(Y~X)
> summary(model)
Call:
lm(formula = Y ~ X)
Residuals:
Min 1Q Median 3Q Max
-3.7980 -1.9464 0.2971 0.9924 5.7429
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 129.787 1.403 92.52 < 2e-16 ***
X -24.020 1.280 -18.77 1.06e-09 ***
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 3.058 on 11 degrees of freedom
Multiple R-squared: 0.9697, Adjusted R-squared: 0.967
F-statistic: 352.3 on 1 and 11 DF, p-value: 1.055e-09
>
> #### For ANOVA table required for your
> model.aov=aov(Y~X)
> summary(model.aov)
Df Sum Sq Mean Sq F value Pr(>F)
X 1 3294 3294 352.3 1.06e-09 ***
Residuals 11 103 9
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
>
Statistics/Computer Science: With a given data set (X,Y) how and what is the code to use...
a. What are the confidence limits (α=0.05) for the difference between the true mean value of Y when X1 = 3 and the true mean value of Y when X2 = -2? Fe (X) Loss in MDD (Y) 1 0.01 127.6 2 0.48 124.0 3 0.71 110.8 4 0.95 103.9 5 1.19 101.5 6 0.01 130.1 7 0.48 122.0 8 1.44 92.3 9 0.71 113.1 10 1.96 83.7 11 0.01 128.0 12 1.44 91.4 13 1.96 86.2 Thirteen specimens of...