[R] Number of lines in analysis after removed missings
Marc Schwartz
marc_schwartz at me.com
Tue Apr 24 16:28:15 CEST 2012
I might just also note that what Eiko is doing is essentially forward stepwise selection and would recommend he do some searching on the perils of using stepwise (especially forward) variable selection methods.
Might also want to look into multiple imputation approaches relative to dealing with missing data.
Regards,
Marc Schwartz
On Apr 24, 2012, at 9:14 AM, R. Michael Weylandt wrote:
> Take a look at nobs()
>
> Michael
>
> On Tue, Apr 24, 2012 at 10:05 AM, Eiko Fried <torvon at gmail.com> wrote:
>> I have a dataset with plenty of variables and lots of missing data. As far
>> as I understand, R automatically removes subjects with missing values.
>>
>> I'm trying to fit a mixed effects model, adding covariate by covariate. I
>> suspect that my sample gets smaller and smaller each time I add a
>> covariate, because more and more lines get deleted.
>>
>> Is there a way of displaying hTow many subjects are "left" in each analysis?
>>
>> Thanks
>> E
More information about the R-help
mailing list