[R] lmList Error in !unlist(lapply(coefs, is.null))

2015-05-13 Thread Lorenzo Lucchi
I have a dataframe with the following structure: 'data.frame': 13095 obs. of 1433 variables: $ my : Factor w/ 624 levels "19631","19632",..: 1 1 1 1 1 1 1 1 1 1 ... $ s1 : num NA NA NA NA NA NA NA NA NA NA ... Where my is a factor with the number of the month, s1,..,,s1426 vectors t

Re: [R] lmList and lapply(... lm) different std. errors

2010-12-15 Thread Dennis Murphy
Hi: On Wed, Dec 15, 2010 at 4:24 AM, beatlebg wrote: > > Am I trying to perform multiple linear regressions on each 'VARIABLE2'. I > figured out that there are different ways, using the following code: > (data > is given at the end of this message) > reg <- lapply(split(TRY, VARIABLE2), function

[R] lmList and lapply(... lm) different std. errors

2010-12-15 Thread beatlebg
Am I trying to perform multiple linear regressions on each 'VARIABLE2'. I figured out that there are different ways, using the following code: (data is given at the end of this message) reg <- lapply(split(TRY, VARIABLE2), function(X){lm(X2 ~ X3, data=X)}) lapply(reg, summary) Which produces

Re: [R] lmList

2009-06-24 Thread Daniel Malter
: [R] lmList Well it doesn´t work with my example, but I will do some more experiences. Could you tell me what means year%in%c(1), more specific c(1). Instead of it I usually write subset=data$year==2000, and I run the regressions one by one for each year. Thanks Cecília Em Wed, 24 Jun 2009 12:44

Re: [R] lmList

2009-06-24 Thread Daniel Malter
-project.org [mailto:r-help-boun...@r-project.org] Im Auftrag von Cecilia Carmo Gesendet: Wednesday, June 24, 2009 8:23 AM An: r-help@r-project.org Betreff: [R] lmList Hi R-helpers: I have a function f<-y~a+b.x and my data is an unbalanced panel data (a dataframe with columns: firm,year,y,x). I n

[R] lmList

2009-06-24 Thread Cecilia Carmo
Hi R-helpers: I have a function f<-y~a+b.x and my data is an unbalanced panel data (a dataframe with columns: firm,year,y,x). I need to run that regression by year. I started to subset the data by year and run the lm () function, but I asked R help how to perform this regressions at once. One

Re: [R] lmList, tapply() and lm()

2008-02-15 Thread Jonathan Baron
Here is an example I just did. I _LOVE_ lmList(). It is such a great convenience compared to the following. But right now it doesn't work for "family=binomial", so I had to do it differently. This is not your example, but it should give you an idea. The [[5]] was because I was interested only

Re: [R] lmList, tapply() and lm()

2008-02-15 Thread Chuck Cleland
On 2/15/2008 11:00 AM, Marc Belisle wrote: > Howdee, > > *** I know that the lmList() function exists, yet I don't want to use it. > *** > > Would anyone be kind enough to tell how I can apply the function lm() to > each level of a given factor so to obtain the intercept and slope for each > fact

[R] lmList, tapply() and lm()

2008-02-15 Thread Marc Belisle
Howdee, *** I know that the lmList() function exists, yet I don't want to use it. *** Would anyone be kind enough to tell how I can apply the function lm() to each level of a given factor so to obtain the intercept and slope for each factor level within a matrix? For instance, suppose a datafram

[R] lmList function in lme4

2007-10-08 Thread Nathan Leon Pace, MD, MStat
I don¹t understand the following error message in lme4. > lmList(formula = oaas.bin ~ oaas.prob | subject, data = inductionPropRemiAll.df, family = binomial) Error in FUN(X[[1L]], ...) : unused argument(s) (family = function (link = "logit") > lmList(formula = oaas.bin ~ oaas.prob | subject, dat