Question

(у-у)2 127.6 0.744902 352.8618 -16.2126 124 0.15451 230.5725 5.96872 110.8 0.026594 3.938698 -0.32364 103.9 0.005917 24.16101 -0.37811 101.5 0.10044 53.51485 -2.31841 130.1 0.744902 453.0349 -18.3703 122 0.15451 173.8341 -5.18257 92.3 0.321402 272.7579 -9.36295 113.1 0.026594 18.35793 -0.69872 83.7 1.181402 630.7825 -27.2985 128 0.744902 368.0495 -16.5578 91.4 0.321402 303.2956 9.87318 86.2 1.181402 511.4556 -24.5812 (x-X) (х-х)(у-у) 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 ЕК х-х х-х total sum 11.35 1414.6 5.7088773396.617 -137.127 mean 0.873077 108.8154SSxx SSyy SSxy

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)?

0 0
Add a comment Improve this question Transcribed image text
Answer #1

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
>

Add a comment
Know the answer?
Add Answer to:
Statistics/Computer Science: With a given data set (X,Y) how and what is the code to use...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT