#First Test FIQ=read.table("C:/Users/Etta/Documents/FIQ.txt",header=TRUE) FIQ attach(FIQ) Y=FSIQ x1f=Weight x2f=Height x3f=MRI_Count LMF=lm(Y~x1f+x2f+x3f) LMF summary(LMF) anova(LMF) step(LMF,direction="backward") extractAIC(LMF) #The tests below are based on calculations above and can be verified above. FMF=lm(Y~x1f+x2f+x3f) RMF=lm(Y~x2f+x3f) anova(RMF,FMF) #Second Test VIQD=read.table("C:/Users/Etta/Documents/VIQ.txt",header=TRUE) VIQD attach(VIQD) Y=VIQ x1v=Weight x2v=Height x3v=MRI_Count LMV=lm(Y~x1v+x2v+x3v) LMV summary(LMV) anova(LMV) step(LMV,direction="backward") extractAIC(LMV) #The tests below are based on calculations above and can be verified above. FMV=lm(Y~x1v+x2v+x3v) RMV=lm(Y~x2v+x3v) anova(RMV,FMV) #Third Test PIQD=read.table("C:/Users/Etta/Documents/PIQ.txt",header=TRUE) PIQD attach(PIQD) Y=PIQ x1p=Weight x2p=Height x3p=MRI_Count LMP=lm(Y~x1p+x2p+x3p) LMP summary(LMP) anova(LMP) step(LMP,direction="backward") extractAIC(LMP) #The tests below are based on calculations above and can be verified above. FMP=lm(Y~x1p+x2p+x3p) RMP=lm(Y~x2p+x3p) anova(RMP,FMP)