similar to: Fixed variance structure for lme

Displaying 20 results from an estimated 2000 matches similar to: "Fixed variance structure for lme"

2005 Nov 03
1
Fitting heteroscedastic linear models/ problems with varIdent of nlme
Hi, I would like to fit a model for a factorial design that allows for unequal variances in all groups. If I am not mistaken, this can be done in lm by specifying weights. A function intended to specify weights for unequal variance structures is provided in the nlme library with the varIdent function. Is it apropriate to use these weights with lm? If not, is there another possibility to do
2006 Sep 20
1
variance functions in glmmPQL or glm?
Hello R users- I am new to R, and tried searching the archives and literature for an answer to this - please be patient if I missed something obvious. I am fitting a logistic regression model, and would like to include variance functions (specifically the varIdent function). I cannot figure out how to do this either in glmmPQL (or something similar) for the model with random effects, or in glm
2012 Feb 27
3
General question about GLMM and heterogeneity of variance
My data have heterogeneity of variance (in a categorical variable), do I need to specify a variance structure accounting for this in my model or do GLMMs by their nature account for such heterogeneity (as a result of using deviances rather than variances)? And if I do need to do this, how do I do it (e.g. using something like the VarIdent function in nlme) and in what package? This is my first
2006 Jul 17
1
Variance functions in package nlme
Dear R-help, I am trying to set up linear mixed effects models in R using the (recommended) nlme package (R version 2.3.1 on a Linux platform). When trying to reproduce an example from Jose Pinheiro & Douglas Bates (2000, p 210) I get the following error message (code to produce message pasted as well): library("nlme") data("Orthodont") vf1Ident <- varIdent(
2007 Jan 02
1
How to extract the variance componets from lme
Here is a piece of code fitting a model to a (part) of a dataset, just for illustration. I can extract the random interaction and the residual variance in group meth==1 using VarCorr, but how do I get the other residual variance? Is there any way to get the other variances in numerical form directly - it seems a litte contraintuitive to use "as.numeric" when extracting estimates,
2009 Apr 01
3
Fit unequal variance model in R
I'am trying to develop some code if R, which would correspond to what I did in SAS. The data look like: Treatment Replicate group1 GSI Control A 1 0.81301 Control B 1 1.06061 Control C 1 1.26350 Control D 1 0.93284 Low A 2 0.79359 Low B
2007 Nov 29
1
Question on structuring variances using the lme4 package
I am modeling the effects of an environmental variable (X) on fish recruitment (Y) for several, ecologically related species (i) using a mixed-effects model. The linear relationship between X and Y includes a fixed effect that is common across all species and random effects that vary by species. In the lmer() notation from the package lme4: Model<- lmer(Y ~ X +(X|i)) Because the residuals of
2006 Mar 07
1
lme and gls : accessing values from correlation structure and variance functions
Dear R-users I am relatively new to R, i hope my many novice questions are welcome. I have problems accessing some objects (specifically the random effects, correlation structure and variance function) from an object of class gls and lme. I used the following models: yah <- gls (outcome~ -1 + as.factor(Trial):as.factor(endpoint)+
2004 Jul 12
2
lme unequal random-effects variances varIdent pdMat Pinheiro Bates nlme
How does one implement a likelihood-ratio test, to test whether the variances of the random effects differ between two groups of subjects? Suppose your data consist of repeated measures on subjects belonging to two groups, say boys and girls, and you are fitting a linear mixed-effects model for the response as a function of time. The within-subject errors (residuals) have the same variance in
2010 Jun 18
2
varIdent error using gam function in mgcv
Hello, As I am relatively new to the R environment this question may be either a) Really simple to answer b) Or I am overlooking something relatively simple. I am trying to add a VarIdent structure to my gam model which is fitting smoothing functions to the time variables year and month for a particular species. When I try to add the varIdent weights to variable Month I get this error returned.
2007 Jun 10
1
{nlme} Multilevel estimation heteroscedasticity
Dear All, I'm trying to model heteroscedasticity using a multilevel model. To do so, I make use of the nlme package and the weigths-parameter. Let's say that I hypothesize that the exam score of students (normexam) is influenced by their score on a standardized LR test (standLRT). Students are of course nested in "schools". These variables are contained in the
2002 Aug 29
8
lme() with known level-one variances
Greetings, I have a meta-analysis problem in which I have fixed effects regression coefficients (and estimated standard errors) from identical models fit to different data sets. I would like to use these results to create pooled estimated regression coefficients and estimated standard errors for these pooled coefficients. In particular, I would like to estimate the model \beta_{i} = \mu +
2018 Feb 21
1
Specify multiple nested random effects in lme with heteroskedastic variance across group
I want to fit a random effects model with two separate nested random effects. I can easily do this using the `lmer` package in R. Here's how: model<-lmer(y ~ 1 + x + (1 | oid/gid) + (1 | did/gid), data=data) Here, I'm fitting a random intercept for `oid` nested within `gid` and `did` nested within `gid`. This works well. However, I want to fit a model where the variance of the
2009 Feb 24
1
Initialize varFunc in R
Hi, I am running R2.8.1 under Linux, and I am having trouble using the variance functions in nlme My basic model was something like: model0 <- lme( log(growth) ~ light * species.group , data=data, random=~light|species ) # with 20 odd species divided in 2 groups Following the methods in Pinheiro&Bates I tried to put a variance function in the model: model1 <- update(model0,
2006 Jun 06
1
gamm error message
Hello, Why would I get an error message with the following code for gamm? I want to fit the a gam with different variances per stratum. library(mgcv) library(nlme) Y<-rnorm(100) X<-rnorm(100,sd=2) Z<-rep(c(T,F),each=50) test<-gamm(Y~s(X),weights=varIdent(form=~1|Z)) summary(test$lme) #ok summary(test$gam) Gives an error message: Error in inherits(x, "data.frame")
2007 Jun 28
1
unequal variance assumption for lme (mixed effect model)
Dear Douglas and R-help, Does lme assume normal distribution AND equal variance among groups like anova() does? If it does, is there any method like unequal variance T-test (Welch T) in lme when each group has unequal variance in my data? Thanks, Shirley
2011 Sep 26
1
normalizing a negative binomial distribution and/or incorporating variance structures in a GAMM
 Hello everyone, Apologies in advance, as this is partially a stats question and partially an R question.  I have been using a GAM to model the activity level of bats going into and coming out from a forested edge.  I had eight microphones set up in a line transect at each of eight sites, and I am hoping to construct a model for each of 7 species.  My count data has a reverse J-shaped skew and
2009 Dec 01
0
Amendment to previous post a minute ago, please amend before posting if possible
Sorry, I just posted the email below but realised I did not give a name or details, would it be possible to adjust before posting and send what is below, sorry again, first time user... From: Joanne Lenehan [mailto:jlenehan@une.edu.au] Sent: Tuesday, 1 December 2009 3:51 PM To: 'r-help@r-project.org' Subject: GLM Repeated measures test of assumptions: e.g. test for sphericity e.g.
2007 Jun 01
2
how to specify starting values in varIdent() of lme()
I was reading the help but just did not get how to specify starting values for varIdent() of the lme() function, although I managed to do it for corSymm(). Do I specify the values just as they are printed out in an output, like c(1, 1.3473, 1.0195). Or do I need to take the residual and multiply it with these like c(0.2235, 0.2235*1.3473, 0.2235*1.0195) or any other form that I dont know of?
2011 May 21
1
predict.gls choking on levels of factor
I've got a gls formula that's a mix of continuous and ordered variables. I wanted to use gls because I wanted to use the varIdent structure. Anyway, attempts to use "predict.gls" choke with the error that the levels I use are not allowed for one of them -- the first one alphabetically, so I'd guess the second would have the same problem. So I have three linked questions --