Re: [R] Applying 'lm' in each group

2009-01-10 Thread Chuck Cleland
On 1/10/2009 12:55 PM, Bhargab Chattopadhyay wrote: > Hi, > > > I want to do regression in each group. I made the group the following way. > Now I want to run regression in each of the three groups.. > Suppose , > x<-c(0.5578196,6.5411662,13.2728619,2.0217271,6.7216176,3.37220617,2.5773252,7.2

Re: [R] Applying 'lm' in each group

2009-01-10 Thread David Winsemius
Did you read the error message? Generally saying "doesn't work" will elicit undesirable responses. Now would be a good time to read the Posting Guide: http://www.R-project.org/posting-guide.html Including: "Say exactly what happened, including any error messages you received. " > lm(yg~xg) E

Re: [R] Applying 'lm' in each group

2009-01-10 Thread Ben Bolker
Bhargab Chattopadhyay yahoo.com> writes: > > Hi, > >  I want to do regression in each group. I made the group the following way. Now I want to run regression > in each of the three groups.. > Suppose , > w > > Now if I write lm(yg~xg) then it won't work. Please advice how to proceed. > > Tha

[R] Applying 'lm' in each group

2009-01-10 Thread Bhargab Chattopadhyay
Hi,  I want to do regression in each group. I made the group the following way. Now I want to run regression in each of the three groups.. Suppose , x<-c(0.5578196,6.5411662,13.2728619,2.0217271,6.7216176,3.37220617,2.5773252,7.2600583,15.3731026,3.4140288,8.1335874,     15..6476637,4.3014084,