# # #### An excellent example of what appears to be a good linear regression model, #### but; upon inspection of the scatterplot matrix...FUNKINESS!! # dataset <- read.table("http://www.unt.edu/rss/class/Jon/R_SC/Module6/IntroPsych_Spring2010.txt", header=TRUE, sep=",", na.strings="NA", dec=".", strip.white=TRUE) attach(dataset) subset <- data.frame(number_grade, absences, neuroticism, extroversion, openness) detach(dataset) model.1 <- lm(number_grade ~ absences + neuroticism + extroversion + openness, subset) library(QuantPsyc) summary(model.1) round(lm.beta(model.1), 4) # Funky, but strong, relationships among the variables. library(car) scatterplotMatrix(subset) cor(subset) # Notice the clustering of the outcome variable (number_grade) and the non-lineaer # relationship between it and the predictor 'absences' (caused by absences being so # skewed). Neuroticism and extroversion also appear to be non-normal; but, they # still appear to be 'linearly' related to the outcome. # END, Feb. 2011