diff --git a/07_final_assignment/.RData b/07_final_assignment/.RData index 8d596fd..7478cef 100644 --- a/07_final_assignment/.RData +++ b/07_final_assignment/.RData Binary files differ diff --git a/07_final_assignment/baboonSimulation.R b/07_final_assignment/baboonSimulation.R index ed528ff..5dd6d77 100644 --- a/07_final_assignment/baboonSimulation.R +++ b/07_final_assignment/baboonSimulation.R @@ -568,8 +568,6 @@ compareML(m1.w, m2.w) #m1 preferred -vis.gam(m1.w, plot.type="contour", color="topo", main="WordAccuracy") - ### NonwordAccuracy m1.n = gam(NonwordAccuracy ~ s(alpha) + s(beta), data=data) @@ -584,6 +582,27 @@ vis.gam(m1.n, plot.type="contour", color="topo", main="NonwordAccuracy") +### NumWordsLearned +m1.l = gam(NumWordsLearned ~ s(alpha) + s(beta), data=data) +summary(m1.l) + +m2.l = gam(NumWordsLearned ~ s(beta), data=data) +summary(m2.l) + +compareML(m1.l, m2.l) +#m2 preferred + +m3.l = gam(NumWordsLearned ~ te(alpha, beta), data=data) +summary(m3.l) + +compareML(m2.l, m3.l) +#m2 preferred + +vis.gam(m1.l, plot.type="contour", color="topo", main="NumWordsLearned") +#note: this plot shows a model which is not justified because m2 is preferred. +#it still is interesting, though. + + ### model criticism qqnorm(m1.g$residuals) qqnorm(m1.w$residuals)