On Oct 22, 2009, at 6:56 AM, Francesca Pancotto wrote:


Dear R community,
probably my question is obvious but I did not find any solution yet by
browsind the mailing list results.
I need to perform a simple ols regression in a dataset with cross section data, where no temporal dimension is inserted. In this data set there are missing values. I would like the software to perform the ols regression
but to just ignore these data and consider the rest.

I tried to use the function na.action=na.omit in

lm( y~x, na.action=na.omit)
but it seems to exert no effect on the function.

You would not expect to see a change in behavior since that is the default na.action for the lm function:

?lm

Some details about x and y would help in understanding why you think the output is not what should be expected. If you are not going to provide an example dataset with dput(x) and dput(y) then at the very least provide summary(x) and summary(y).


--

David Winsemius, MD
Heritage Laboratories
West Hartford, CT

______________________________________________
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.

Reply via email to