I can't figure out why this is returning an NA for the slope in one case, but not in the other.
I can tell that R thinks the first case is singular, but why isn't the second? ## Define X and Y ## There are two versions of x ## 1) "as is" ## 2) shifted to start at 0 y = c(58, 57, 57, 279, 252, 851, 45, 87, 47) x1 = c(1334009411.437, 1334009411.437, 1334009411.437, 1334009469.297, 1334009469.297, 1334009469.297, 1334009485.697, 1334009485.697, 1334009485.697) x2 = x1 - min(x1) ## Why doesn't the LM model work for the "as is" x? lm(y~x1) lm(y~x2) My environment: Windows XP, R 2.14.1 [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.