Question
2. Now make a new dataset where you have omitted data points that have residuals with standardized residuals greater than 3 or less than $-3$
2. Now make a new dataset where you have omitted data points that have residuals with standardized residuals greater than 3 or less than $-3$ (if you get stuck on how to delete rows, google "r how to delete rows with conditions"). Reanalyze the data without these outlying observations. Have the basic conclusions changed, regarding whether the slope is 0 or not?
3. 3. Suppose an Academic Score of 400 is an important benchmark. Perform a hypothesis test for $H_{0}:E(Y|X=0.75)=400$ vs. $H_{a}:E(Y|X=0.75)>400$. You'll have to put the pieces of this together to form the t-statistic and compute the p-value. (For this and all remaining problems, use the full dataset instead of the one which omits observations with large absolute residuals.)
How to solve these problems??By R code?
The following is R code?
# read data from .csv file FullDataset
# include only 2011 data SLRData11=FullDataset[FullDataset$season==11,]; # could also do it: # SLRData11=FullDataset[FullDataset[,3]==11,]
# omit columns we don't need SLRData11=SLRData11[,c(-1,-2,-4,-5)] # how many observations? nrow(SLRData11)
# standardize PACER and pushup score, based on max in dataset SLRData11$adjpacer=SLRData11$pacer/max(SLRData11$pacer); SLRData11$adjpushup=SLRData11$pushup/max(SLRData11$pushup);
# construct fitness index SLRData11$fit.index=SLRData11$adjbmi+SLRData11$adjpacer+SLRData11$adjpushup;
plot(SLRData11$academic~SLRData11$fit.index,ylab="Academic Score",xlab="Fitness Index")
# Fit the SLR model and store results in object "fitness.slr" fitness.slr = lm(academic ~ fit.index,data=SLRData11)
# Print the two regression parameter estimates: b0 and b1 print(fitness.slr) summary(fitness.slr) anova(fitness.slr)
confint(fitness.slr,,.95) # CI's for both parameters confint(fitness.slr,c(2),.95) # CI for only b1
# Prediction and inference for mean response and predictions new=data.frame(fit.index=c(1.5,2.4)) # new X's at which to predict new.predict=predict(fitness.slr,new) # prediction
# CI for mean response at X values given in 'new' predict(fitness.slr,new,interval="confidence",se.fit=TRUE)
# PI for predicted values at X values given in 'new' predict(fitness.slr,new,interval="prediction")
par(mfrow=c(2,2))
std.resid=rstandard(fitness.slr) std.resid[abs(std.resid)>3]
# examine SLRData11[c(151,294,550,658),]
```{r} plot(fitness.slr) ```
.i..liStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started