June 2007
Beginner to intermediate
950 pages
27h 8m
English
If you have several different dataframes containing the same variable names (say x and y) then the simplest way to ensure that the correct variables are used in the modelling is to name the dataframe in the function call:
model<-lm(y ~ x,data=correct.frame)
The alternative is much more cumbersome to type:
model<-lm(correct.frame$y ~ correct.frame$x)
Read now
Unlock full access