I have been doing some work in r on the National Survey of College Graduates. I was trying to look at the difference in salaries between different majors. To do this:
- I first took the log of peoples salaries and put it into a separate column
projectdata <- cbind(projectdata, logsalary )
- Then just to see how it worked I wanted to take the mean of the column which ended up like this:
What does the -Inf mean? When I take the mean of salary as not a log it works.
- When I try to run a regression with this, this happens:
genderreg <- lm(projectdata$logsalary ~ projectdata$female)
Error in lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...) :
NA/NaN/Inf in 'y'
Does anyone have any idea what is going on here?