Displaying 20 results from an estimated 20000 matches similar to: "sorting in lmList object"
2004 May 01
1
changes to y-axis labels in lmList intervals plot
Dear List,
I am plotting lmList objects using plot(intervals()) in nlme
package. I want to make changes to the y-axis labels. When I
try to change cex of y-axis labels using the following:
fm1 <- lmList(distance ~ age | Subject, Orthodont)
plot(intervals(fm1), scales=list(y=list(cex = .7)))
I receive: Error in bwplot(formula = group ~ intervals | what,
data = structure(list( : formal
2018 Jul 28
1
possible bug in plot.intervals.lmList
Dear R-devel members,
I think I've found a minor bug in plot.intervals.lmList. ( The guide
https://www.r-project.org/bugs.html suggests to report it here, as I
do not have a bugzilla account.)
Here is a minimal reproducible example to demonstrate the problem:
fm1 <- lmList(distance ~ age | Subject, Orthodont)
plot(intervals(fm1),ylab="a")
This results in: "Error in
2010 Oct 25
1
Error: could not find function "lmList"
Dear colleges,
I would like to use the lmList function. I have installed the lme4 library but when I try to use the lmList function I get this error message.
Error: could not find function "lmList"
Here you can see what kind of messages I am getting when installing lme4 package. Does anyone know how to solve this problem?
Thanks
Rosario
> install.packages()
--- Please select a
2006 Jan 17
2
multiple GLMs with lmList in lme4
I'd like to fit a GLM to each of a number of subsets of some data. The `family' argument to `lmList' (in lme4) has given me cause for optimism, but so far I've only been able to achieve linear model fits. For example
> df <- data.frame(gp = gp.temp <- factor(rep(1:3, each = 100)),
x = x.temp <- rnorm(300),
y = rpois(300, exp((-1:1)[gp.temp] + x.temp)))
Then a call to
2013 Nov 20
1
nlme function summary.lmList cannot be found with new versions
Hello,
I installed the newest version of R (3.0.2) as well as the newest version of
nlme (3.1-113) in order to use summary.lmList and other nlme functions. Once
loading the new library, lmList and summary.lm can be found, but a number of
additional functions cannot be found via command.
Versions installed and loaded are correct. Any suggestions on how to allow
for these functions of the new
2005 May 13
1
error in plot.lmList
Hello,
in R-2.1.0 I'm trying to prodice trellis plots from an lmList object as described in the help for plot.lmList. I can generate the plots from the help, but on my own data plotting fails with an error message that I cannot interpret (please see below). Any hints are greatly appreciapted.
kind regards,
Arne
> dim(d)
[1] 575 4
> d[1:3,]
Level_of_Expression SSPos1 SSPos19
2003 May 07
1
[R ] Query : problems with the arithmetic operator "^" with function "lme" and "lmList"
Dear all,
I've got a problem in including square variables in lme and lmlist
functions. I've tried to work on Oxboys data of Pinheiro and
Bates'book, which consist of the heights of 26 boys, each mesured on
nine different occasions :
> Oxboys
Grouped Data: height ~ age | Subject
Subject age height Occasion
1 1 -1.0000 140.50 1
2 1 -0.7479 143.40
2003 May 07
1
[R ] Query : problems with the arithmetic operator "^" wi th function "lme" and "lmList"
Dear Martin,
Have you try to create a new variable for age squared, say agesq? If you fit
the model using this new variable you should get the coefficients. So your
new model is something like height~age+agesq
I hope this helps,
Saghir
> -----Original Message-----
> From: MARTIN Ludovic [SMTP:martinl@mathinfo.ens.univ-reims.fr]
> Sent: Wednesday, 07 May, 2003 2:02 PM
> To:
2005 Apr 08
1
subset arg lmList
I'm having trouble understanding how functions in the subset argument for
lmList search for the objects they need. This trivial example produces
"Error in rownames(fakedf) : Object "fakedf" not found":
library(nlme)
fitbyID <- function() {
fakedf <- data.frame(ID = gl(5, 10, 50),
A = sample(1:100, 50),
B = rnorm(50))
2008 Feb 15
2
lmList, tapply() and lm()
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 dataframe containing 3 variables: id, x and y.
I want to compute the function lm() for each level
2009 Aug 09
1
help with a loop (coefficients with lmList)
Hi R-helpers.
#I start with the reproducible example:
firm<-c(rep(1,10),rep(2,10),rep(3,10),rep(4,10),rep(5,10))
year<-c(rep(1998:2007,5))
industry<-c(rep(1,20),rep(5,10),rep(7,10),rep(9,10))
X1<-rnorm(50)
X2<-rnorm(50,mean=0.5,sd=0.1)
Y<-rnorm(50,mean=0,sd=0.5)
data<-data.frame(firm, industry,year,X1,X2,Y)
data
#I need to calculate for all the industries the following
2010 Dec 15
1
lmList and lapply(... lm) different std. errors
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 the following:
$`1`
Call:
lm(formula = X2 ~ X3, data = X)
Residuals:
Min
2009 Jun 16
2
save the output of summary(lmList(x)) into a dataframe
Hi r-helpers!
I need to save the output of summary() function that I?ve
runned like this:
z<- lmList(y~x1+x2| x3,
na.action=na.omit,data1,subset=year==1999)
w<-summary(z)
The output (w) is something like this:
Call:
Model: y ~ x1 + x2 | x3
Data: data1
Coefficients:
(Intercept)
Estimate Std. Error t value Pr(>|t|)
1 0.081110514 1.141352e-01
2006 Aug 18
0
lmList and missing values
Dear all,
I have a question on handling of missing values in lmList. My data set
have continuous predictor and response, x and y, and a grouping variable
group.id. All these variables have NAs and the data set also has several
other variables that also contains NAs.
To create the lmList-object seems to work fine:
y.list <- lmList(y ~ x | group.id, data=mydata, na.action=na.omit)
However,
2008 Dec 17
1
Noobie question, regression across levels
NB: Not reply needed (Ben was extremely helpful!)
I've just started using R last week and am still scratching my head.
I have a data set and want to run a separate regression across each level of
a factor (treating each one separately). The data right now is arranged such
that the value of the factor along which I want to "split" my data is one
column among many.
Best way to do
2008 Oct 06
1
question on lmList
Hi list,
Using the lmList function from ?nlme package? I get the following error message:
?Error in !unlist(lapply(sum.lst, is.null)) : invalid argument type?
# this is the syntax used
# fm_cream <-lmList(MULTDV~TIME|cod, data=zz, na.action=na.omit)
# summary(fm_cream)
When I generate a simple example the function works, but on the real data I get that message. I imagine that it is a
2003 Oct 06
2
Selecting a random sample for lmList()
Dear List:
I have a data set with over 7000 students with about 4 observations over time per student. I want to examine the within-group fits of a random sample of this group as it takes forever to compute and draw all 7000 regressions.
Here is the code I have used so far.
>group<-groupedData(math~year|childid, data=scores)
>group.list<-lmList(group)
2007 Apr 02
2
Why does lmList() fail when lm() doesn't?
Dear r-helpers,
Can anyone suggest why lm() doesn't complain here:
summary(osss.lm1 <- lm(logOdds ~ c.setSize %in% task, data = osss))
whereas in package:nlme (and in package:lme4)
osss.lmL <- lmList(logOdds ~ c.setSize %in% task | subj, data = osss)
# Error in `contrasts<-`(`*tmp*`, value = "contr.treatment") :
# contrasts can be applied only to factors with 2 or more
2015 Sep 20
0
summary(lmList) issues
Over on StackOverflow someone is trying to get this code to work:
library("nlme")
fm2Pixel.lis<-lmList(pixel~day+I(day^2)|Dog, Pixel)
summary(fm2Pixel.lis)
(results: Error in `[<-`(`*tmp*`, use, use, ii, value = lst[[ii]]) :
subscript out of bounds)
http://stackoverflow.com/questions/32680306/plotting-individual-confidence-intervals-for-the-coefficients-in-the-lmlist-fit
2004 Sep 13
1
lmList for glm
Greetings all,
Is there a way to do the equivalent of a lmList (fit separate models for each subject) in the package nlme for a glm?
Thank you very much,
Peter B.
[[alternative HTML version deleted]]