similar to: linear mixed models (PR#188)

Displaying 20 results from an estimated 6000 matches similar to: "linear mixed models (PR#188)"

2006 Nov 28
2
Problem with pairs() in nlme
Dear r-helpers, After successfully running require(nlme) vfr.lmL <- lmList( estimate ~ (slant + respType + visField + hand)^2 | subject, vfr ) pairs(vfr.lmL, id = 0.01, adj = -0.5) # Pinheiro & Bates (p. 141) produces the following error: Error in sprintf(gettext(fmt, domain = domain), ...) : object "form" not found Any guesses as to what I may have done wrong?
2008 Oct 08
1
Observed responses in 'augPred' data frame - Wrong order ?
Dea-R community. I'd like to draw your attention to an issue I have recently encountered while doing my current data analysis. I've got an unexpected (to me) result from the command: > augPred(lmList(my.object)), 'my.object' being a grouped data frame of class: > class(my.object) [1] "nfnGroupedData" "nfGroupedData" "groupedData"
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)
2012 Sep 14
1
linear mixed-effects models with two random variables?
Dear R users, Does anyone knows how to run a glmm with one fixed factor and 2 random numeric variables (indices)? Is there any way to force in the model a separate interaction of those random variables with the fixed one? I hope you can help me. #eg. Reserve <- rep(c("In","Out"), 100) fReserve <- factor(Reserve) DivBoulders <- rep
2017 Aug 15
1
ANOVA test to decide whether to use multiple linear regression or linear mixed effects model
R-help: I am trying to decide between using a multiple linear regression or a linear mixed effects model for my data: model1 <- lm (responsevariable ~ predictor1 + predictor2 + predictor3 + predictor4, data= data) model2 <- lme (responsevariable ~ predictor1 + predictor2 + predictor3 + predictor4, random = ~1 | site, data= data) anova (model1, model2) but I keep getting the
2006 Jan 18
2
Help with mixed effects models
Dear R-users I have problems using lme The model i want to fit can be viewed as a two-level bivariate model Two-level bivariate: bivariate (S coded as -1,T coded as 1) endpoint within trial OR It can equivalently be considered as a three-level model.Three-level: endpoint within patient, patient within trial. My code tries to model the levels through a RANDOM statement and a
2000 Mar 31
2
linear models
Dear R users, I have a couple of linear model related questions. 1) How do I produce a fixed effect linear model using lme? I saw somewhere (this may be Splus documentation since I use Splus and R interchangeably) that using lme(...,random= ~ -1 | groups,...) works, but it gives the same as lme(...,random= ~ 1 | groups,...), ie. fits a random effect intercept term. The reason why I want to do
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
2012 Jun 19
1
Possible bug when using encomptest
Hello R-Help, ----------------------------------------------------------------------------------------------------------------------------------------- Issues (there are 2): 1) Possible bug when using lmtest::encomptest() with a linear model created using nlme::lmList() 2) Possible modification to lmtest::encomptest() to fix confusing fail when models provided are, in fact, nested. I have
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:
2003 Sep 08
0
lmList with NAs
Hello R-Helpers, I was trying to use the lmList function to get the lmList graphic similar to Pinheiro and Bates (pg 33). I did not have a problem creating the graphic when I used the Orthodont data frame or 2 other data sets when there are no missing values. My data has missing values. Do I need to remove the missing values before the lmList function will work? for a small example: > a
2007 Nov 07
1
mixed model testing
Is there a formal way to prove the need of a mixed model, apart from e.g. comparing the intervals estimated by lmList fit? For example, should I compare (with AIC ML?) a model with seperately (unpooled) estimated fixed slopes (i.e.using an index for each group) with a model that treats this parameter as a random effect (both models treat the remaining parameters as random)? Thank you!
2003 Feb 13
1
sorting in lmList object
Hi all, Forgive me if this is an obvious one.... I want to make a plot of confidence intervals from an lmList object with a collection of simple linear models (lm(y~x)) using: plot(intervals(mylmList)) and sort the plot by increasing mean values for the intercept. Is there an easy way of doing this? I've tried the "order()" and "sort.list()" functions, but I suspect
2004 Jan 21
1
Problem with lme, ns and df (variable scoping problem?)
Hi, I'm experimenting with random effect natural splines, and I've encountered an odd problem. library(nlme); library(splines) a <- data.frame(x = 1:10, y = 1:10 + runif(10, min=-3, max=3), c = rep(c(1,2),5)) df <- 10 lml <- lmList(y ~ ns(x,df=df) | c, a) Error in df - 1 : non-numeric argument to binary operator I presume this is because the formula isn't evaluated
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