Displaying 20 results from an estimated 1000 matches similar to: "Fitting heteroscedastic linear models/ problems with varIdent of nlme"
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
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(
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 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?
2007 Sep 27
1
Getting intervals for within-group standard errors for each group using nlme and varIdent
I am using lme from the nlme package to fit a mixed model. We have observations nested in patients(encounters) and patients nested in groups (2 different treatments). We are interested in the differences between the 2 groups, both the means and the standard deviations (are patients in group A less variable than those in group B? both within patient and between patient within group).
Here is
2003 Mar 14
0
gls with "crossed heteroscedasticity"
Dear All,
I am using the function gls (in the nlme package) and I would like to fit a
heteroscedastic model, with different variances for each of the levels of two
stratification variables.
In p. 210 of Pinheiro & Bates ("Mixed effects models in S and S-Plus", 2000,
Springer), the authors show the use of the "*" operator. However, that is not
what I want, because it
2007 Aug 07
0
Bug in coef<-.varIdent method (nlme package) (PR#9831)
Hello,
1. It appears that "coef<-.varIdent" method does not work properly in
some instances.
Execution error:
Error in `coef<-.varIdent`(`*tmp*`, value = c(11, 12)) :
Cannot change the length of the varIdent parameter after
initialization
occurs when "coef<-.varIdent" is applied to an initialized object of
class varIdent with some of the coefficients
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
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,
2009 Apr 06
1
nlme weighted
Dear R-expert
I'm fitting a non linear model (energy allocation model to individual
growth data) using your nlme routine. For each individual I have thus a
number of observations (age and size) to which I fit the nonlinear
function, with random effects for the individuals on the estimated
parameters (individual as the grouping factor). The sampling of these
individuals was stratified (size
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
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 --
2009 Dec 13
0
How to control the skewness of a heteroscedastic variable?
Dear listusers,
I don't know whether my problem is statistical or computational, but
I hope I could recieve some help in either case.
I'm currently working on a MC-simulation in which I would like to
control the skewness of a heteroscedastic dependent variable defined
as:
y=d*z+sqrt(.5+.5*x^2)*e (eq.1)
where d is a parameter and, z, x, and e are gamma r.vs. The variables
x
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
2005 Jun 15
1
anova.lme error
Hi,
I am working with R version 2.1.0, and I seem to have run into what looks
like a bug. I get the same error message when I run R on Windows as well as
when I run it on Linux.
When I call anova to do a LR test from inside a function, I get an error.
The same call works outside of a function. It appears to not find the right
environment when called from inside a function. I have provided
2006 Jun 01
1
setting the random-effects covariance matrix in lme
Dear R-users,
I have longitudinal data and would like to fit a model where both the variance-covariance matrix of the random effects and the residual variance are conditional on a (binary) grouping variable.
I guess the model would have the following form (in hierarchical notation)
Yi|bi,k ~ N(XiB+Zibi, sigmak*Ident)
bi|k ~ N(0, Dk)
K~Bernoulli(p)
I can obtain different sigmas (sigma0 and
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
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+