similar to: Question on structuring variances using the lme4 package

Displaying 20 results from an estimated 5000 matches similar to: "Question on structuring variances using the lme4 package"

2009 Dec 01
0
GLM Repeated measures test of assumptions: e.g. test for sphericity e.g. Bartletts and Levenes homogenous variances
Hello and thanks in advance I am running a glm in R the code is as follows with residual diagnostic code below model4<-glm(Biomass~(Treatment+Time+Site)^2, data=bobB, family=quasi(link="log", variance="mu")) par(mfrow=c(2,2)) plot(model2) to test the effect of grazing exclusion of feral horses for a Phd with following factors: Treatment - 3 levels which are grazed
2006 Oct 04
1
extracting nested variances from lme4 model
I have a model: mod1<-lmer( x ~ (1|rtr)+ trth/(1|cs) , data=dtf) # Here, cs and rtr are crossed random effects. cs 1-5 are of type TRUE, cs 6-10 are of type FALSE, so cs is nested in trth, which is fixed. So for cs I should get a fit for 1-5 and 6-10. This appears to be the case from the random effects: > mean( ranef(mod1)$cs[[1]][1:5] ) [1] -2.498002e-16 > var(
2007 Dec 18
0
Specifying starting values in lme (nlme package) using msScale
I am using package nlme and would like to specify initial values for a linear mixed-effects model to help with convergence. I am trying to specify those initial values using the msScale option under ?control? in the lme() function: lme(Y ~ X1, random= ~ X1|X2, control=list(msScale=lmeScale)) where, (as far as I understand), lmeScale is a function that can take initial values for parameters.
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 +
2012 Jun 03
0
multiple variance structure in lmer giving zero variances
Hi all, I’m hoping someone might be able to help me out. Forgive me if my mistake is something simple. I am new to mixed models, new to R, and new to lme4 and am struggling to figure everything out. I have two questions that I am hoping someone can answer. 1) Am I using the correct random structure for my model? 2) Can someone help me figure out what is wrong with my syntax to code for random
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
2004 Dec 14
1
correlation in lme4
Dear all, I have tried to consider a correlation structure in lme (package lme4), but without success. I have used something like: > risul<-lme(y~x+ z , data=mydata, random=~ x | g, correlation = corAR1()) but the result is the same as: > risul<-lme(y~x+ z , data=mydata, random=~ x | g). Can anybody help me? Antonella ************************************************** Prof.
2010 Sep 18
1
modeling variance heterogeneity in lme4
Hi all, I have major heterogeneity in variances across labs (100-fold). There is no apparent variance heterogeneity across y-hat. By using lme4 in the following way, am I accounting for the variance differences in labs?: lmer(y ~ fixed1 + covariates + (fixed1|labs)) I'm not sure that it is - I think it is only allowing the means (slopes [conditional means] & intercepts) to differ
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
2005 Feb 14
1
testing equality of variances across groups in lme?
Hello. I am fitting a two-level mixed model which assumes equality of variance in the lowest-level residuals across groups. The call is: fit3<-lme(CLnNAR~CLnRGR,data=meta.analysis, + na.action="na.omit",random=~1+CLnRGR|study.code) I want to test the assumption of equality of variances across groups at the lowest level. Can someone tell me how to do this? I know that one
2005 Jun 24
1
lme4 extracting individual variance components
Hi, For further calculations I need to extract indivdual Variances of different random effects from a fitted model. I found out how to extract the correlations (VarCorr(m1)@reSumry$group1) but I was not able to find a way to extract the other components individually. To extract the Residuals I tried: (ranef(m1)@ stdErr) which unfortunately did not work. Thank you very much for your help!
2010 Apr 14
2
GAMM : how to use a smoother for some levels of a variable, and a linear effect for other levels?
Hi, I was reading the book on "Mixed Effects Models and Extensions in Ecology with R" by Zuur et al. In Section 6.2, an example is discussed where a gamm-model is fitted, with a smoother for time, which differs for each value of ID (4 different bird species). In earlier versions of R, the following code was used BM2<-gamm(Birds~Rain+ID+
2008 Nov 15
1
how to join these two models?
Dear R users, I have this 2 models that fit to my data: M3varI <- update (M3, weights=varIdent(form= ~ 1|SITE)) M3AR1<-update(M3,correlation=corAR1()) The first one, updates my M3 so that I can account for the variance structure of random erros. The second one, updates my M3 so that I can account for the correlation structure of random errors. How can I put them toghether in one
2009 Aug 13
1
R code to reproduce (while studying) Bates & Watts 1988
Hi R users, I'm here trying to understand correlated residuals in nonlinear estimation. I'm reading/studying the book Bates, D. M. and D. G. Watts, (1988), /Nonlinear regression analysis and its applications/, Wiley, NY. pages 92-94, trying to reproduce the figures and to find out the code in R to perform the necessary calculations. I also consulted Pinheiro and Bates, but without
2010 Oct 04
1
Fixed variance structure for lme
I have a data set with 50 different x values and 5 values for the sampling variance; each of the 5 sampling variances corresponds to 10 particular x values. I am trying to fit a mixed effect linear model and I'm not sure about the syntax for specifying the fixed variance structure. In Pinheiro's book my situation appears to be similar to the example used for varIdent, where there is a
2007 Jan 16
2
Gaussian glm for grouped data with unequal variances
Hello - I am fairly new to R, (i.e., ability to create functions/write programs insignificant) and was wondering if there might be a convenient way to model the following: I want to fit a gaussian glm to grouped data, while allowing for unequal variances in each of the groups. More specifically, my data set looks something like this: ---------------- data group 1 76 1 2 82 1 3
2012 May 02
3
Consulta gráfica
  Hola,   Por favor, ¿podríais indicarme qué recursos (librerías o ideas) pueden resultar de utilidad para crear un gráfico del estilo del de la figura 3.8 del siguiente link?   http://www.tsc.uvigo.es/BIO/Bioing/ChrLDoc3.html#3.5   Actualmente estoy utilizando funciones muy básicas y la verdad es que no me encuentro muy satisfecha con el resultado.   Muchas gracias.   Eva [[alternative HTML
2008 Nov 15
1
GAMs and GAMMS with correlated acoustic data
Greetings This is a long email. I'm struggling with a data set comprising 2,278 hydroacoustic estimates of fish biomass density made along line transects in two lakes (lakes Michigan and Huron, three years in each lake). The data represent lakewide surveys in each year and each data point represents the estimate for a horizontal interval 1 km in length. I'm interested in comparing
2004 Nov 13
0
Variance and Covariance Matrix D and R in nlme or lme4.
Hi, How extract the Variance and Covariance Matrices D of random effects and R of error in the lme object? Thanks in advance. Alexandre Galv??o
2004 May 13
3
GLMMs & LMEs: dispersion parameters, fixed variances, design matrices
Three related questions on LMEs and GLMMs in R: (1) Is there a way to fix the dispersion parameter (at 1) in either glmmPQL (MASS) or GLMM (lme4)? Note: lme does not let you fix any variances in advance (presumably because it wants to "profile out" an overall sigma^2 parameter) and glmmPQL repeatedly calls lme, so I couldn't see how glmmPQL would be able to fix the dispersion