Re: [R] lm: mark sample used in estimation

2011-07-12 Thread Anirban Mukherjee
Thanks Peter, Ted! Best, Anirban On Tue, Jul 12, 2011 at 4:54 AM, Ted Harding wrote: > On 11-Jul-11 07:55:44, Anirban Mukherjee wrote: >> Hi all, >> >> I wanted to mark the estimation sample: mark what rows (observations) >> are deleted by lm due to missingness. For eg, from the original >> exam

Re: [R] lm: mark sample used in estimation

2011-07-11 Thread Ted Harding
On 11-Jul-11 07:55:44, Anirban Mukherjee wrote: > Hi all, > > I wanted to mark the estimation sample: mark what rows (observations) > are deleted by lm due to missingness. For eg, from the original > example in help, I have changed one of the values in trt to be NA > (missing). > ># code below >#

Re: [R] lm: mark sample used in estimation

2011-07-11 Thread peter dalgaard
On Jul 11, 2011, at 09:55 , Anirban Mukherjee wrote: > But I am ideally looking for a way that allows one to use any formula > in lm, and still be able to mark the estimation sample. > Function/option I am missing? The best I could come up with: > >> lm.D9 <- lm(weight ~ group, model=TRUE) >> in

[R] lm: mark sample used in estimation

2011-07-11 Thread Anirban Mukherjee
Hi all, I wanted to mark the estimation sample: mark what rows (observations) are deleted by lm due to missingness. For eg, from the original example in help, I have changed one of the values in trt to be NA (missing). # code below # # original example > ctl <- c(4.17,5.58,5.18,6.11,4.50,4.6