Qqqq qqqqq qqqq q qq q q q q q qq q q qq qqqq q qq q

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: q q qq qq q q q q q q q q qq qq qqqq q q q q qq q q q q qqqqq qq q qq q q qqq qqqq q q qq q qq q q q qq qqqq qqq qq qq qq qq qq qqq qqq q qqqq q qqq q q qqq qq q q q q qq q qqq q qq q q q qq qqq q q q q q qq q q q q qq q q qq q qq qqq qqqqq q q q q q qqqq qqqqq q qq qqq q q q qqq q q q q q qq q q q q qq qqq qq qq qq q q q qqq qq qq qq q q q q qq q qq q qq qq qqq qqqq qqqqq qqqq q qq q q q q q qq q q qq qqqq q qq q q q q q q q q qqqq qq q q q qq q q qq q qq q qqq qq q qq qqq qqq qq q q qq q q q q q qq qq qq q q q qqqq qq q q qqq qqq qq qq qqqqq q q qq q q q q qq q q qqq q qq q qq q qqq qq qqq qq q q qq qq q qq q q q q qq q q qq q q q q q q q −0.2 par(mfrow=c(1,1),pty="s") ##The simple version is not that helpful with two-valued variables ##plot(relig.money~freemkt.vs.govt,data=nes08.df) ##points(fitted(lm1)~freemkt.vs.govt,data=lm1$model,pch=19,cex=1.5) ##A more informative version:actually showing the data and a line plot(jitter(relig.money)~jitter(freemkt.vs.govt), xlab="Econ Ideology (Strong govt or Free Mkt)", ylab="Ever Gave Money to Relig Org (No or Yes)", data=nes08.df,cex=.7,col="gray") points(fitted(lm1)~freemkt.vs.govt,data=lm1$model,pch=19,cex=1.5) preddat<-data.frame(freemkt.vs.govt=c(0,1)) preddat$fit.lm1<-predict(lm1,newdata=preddat) lines(fit.lm1~freemkt.vs.govt,data=preddat,lwd=2) 1.0 1.2 plot(y ~ x, data = mydata) points(fitted(lm1) ~ x, data = lm1$model, pch = 19) q qq q q qqq q qq q qq qq q q q q q qq q qq qq q q qq q q q q q q qq qq q q q q qq q q q q qq qq q qq q q q q q q qq q q qq q q qq q qq q q qq q q qq q q q qqq q q qq q qq q q q qq q q q q qq q qq qq qq q q q q qqqqqq q qq q q qq q qq qqq qq qq q qq q qq q q q q qq qq q qq qq qq q q qq q q q q q qq q qq q qq q q q q q q q q qq q q qq qq q q q q qq qq q qq q qqq q q q q qq q q q qq qq q q q q q qq q q q q qq q qq q q q q q qqq qq qq q q q q q q q qq qq q qq q q qqq q q qq qq qq q q q q q qq q qq q q q q qq q qq q q q q qq q q qq q q q q qq q qq q q q q qq q q q qq q q q q q q q q qq q q q q q q q q qq qq q q qq q q q q q q qq q q q q qq q q qq q qq q qq q qq q −0.2 0.0 0.2 qqq q q q q q q q qq q q q q q q q q qq q q q qq q q qq q qq q qqq q qq q qq qqq q qq qq q q qq q q q q q qq q q q q qq q qq q q q q qq q q qq q qq q q q qqq q q q qq q q qq q q q qq qq qq q qq q q q q qq q q q q 0.4 0.6 0.8 1.0 1.2 Econ Ideology (Strong govt or Free Mkt) This plot is not what I would have expected. I expected no relationship but instead I see a small relationship. So, now I wonder whether my initial ideas about religiousity and economic atttidues being unrelated are correct or whether they need to be modified. 7. How well does this model fit? Calculate both the R2 and the typical variation in the residuals and interpret those numb...
View Full Document

Ask a homework question - tutors are online