Skip to content
Prev 58924 / 398502 Next

OLS error

On Thu, 11 Nov 2004, DrakeGis wrote:

            
The author of the Design package has already replied to this point. If the 
function only fails with your data, the data are the problem, not the 
function.
The posting guide does say read the appropriate documentation. R is 
distributed with lots of documentation, including "An Introduction to R", 
see -> Statistical models in R -> Linear models. Reading the help page for 
the ols() function from the Design package will show that it adds 
functionality to the base lm() function, which your example is not using, 
so you can certainly use lm() until you need more.
Yes, but this isn't the case here. If you had read the posting guide, you 
would understand that some questions are easier to answer when the version 
is known, and the version is found by typing version at the R prompt, 
surprisingly, and shows basic information about the OS too.
Please copy the contents of the console to your messages. Any of this 
could be caused by simple mistakes, attach() is not needed often (I never 
use it), and especially not for lm() and friends, which have the data= 
argument to be sure that the object in the formula is the one in the data= 
object, not any other with the same name that might be lying around. Try 
running in a fresh session too without loading your old workspace - one or 
other of your RHS variables is not what you think it is.

There is very little doubt that you have problems with your data.  
However, you have not bothered to show the error messages to the list. Try
to go through the same steps using lm() and making the data from runif()  
and rnorm() - simulated data using set.seed() - and then run the examples
for lm(), etc, and if you can demonstrate that the functions still return
errors, the cause should be easier to establish.