I'm using R to create a linear regression model from survey data about public sentiment for a new technology. I am encountering a problem where the addition of a new explanatory variable raises the model's $R^2$ value from 0.52 to precisely 1. This is absurd, but I'm new to this stuff and can't figure out what's going on.
The survey asks several questions about demographic and values and technical knowledge. These items become the explanatory variables in the model. Most are either dummy variables or likert scales that extend from 1 to 7 (meaning that for every such question, each respondent chooses a number between 1 and 7). The survey also asks respondents to what extent they'd support government investment in the new technology. That question becomes the dependent variable in the model. It is also a likert scale that extends from 1 to 7.
I'm using R's lm()
function to regress the knowledge, demographics, and values variables against the support for new technology variable. The functional form is:
lm(support~demographics+values+knowledge,data=survey).
Out of about 2000 survey responses, 900 remain after NA's are discarded. I created a model comprising approximately 20 explanatory variables, with an $R^2$ value of 0.52. Then, I added in a 21st explanatory variable, and the $R^2$ jumped to 1. When I do a simple regression of only this new variable and the dependent variable, the $R^2$ is 0.67. What could be going on?
survey
dataset -cor(survey[c("support","demographics","values","knowledge")])
$\endgroup$ – thelatemail Jan 30 '15 at 1:26