Displaying 20 results from an estimated 9000 matches similar to: "need help getting started writing a new varFunc class for lme()"
2005 Mar 10
1
how to view the syntax of a method which is not a generic method
Hello - I'm trying to modify an option for the lme() or nlme() macros.
I want to write my own specification for the variance function and am
following homework problem 4, Chapter 5, page 268 of Pinheiro and Bates
book on mixed effect.
I'm up to point where I've created a new class using an existing
variance function class, varExp as a template. Next I need to write an
2010 Mar 09
0
varComb in gls/lme
Dear R-help members,
I have a question regarding how to use varComb function to specify a
variance function for the "weights" in the gls. I need to fit a
linear model with heteroscedasticity. The variance function is
exp(c0+nu0*W +nu1*W^2) where W is a covariate. Initially I want to use
varFunc to define my own variance function following the instruction in
the Pinheiro and
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 Oct 03
1
creating new varFunc classes in nlme .. error: "Don't know how to get coefficients for .. object"
Hello. I am trying my hand at modifying the varFunc
class varExp, but I must be missing a step. All I
want to do right now is make a working copy of varExp,
call it varExp2, and then later change it.
coef.varExp2, coef<-.varExp2, and Initialize.varExp2
all seem to work properly after I construct them. I
can successfully use the commands:
v2 <- varExp2(form = ~age|Sex,fixed =
2005 Jan 24
4
lme and varFunc()
Dear R users,
I am currently analyzing a dataset using lme(). The model I use has the
following structure:
model<-lme(response~Covariate+TreatmentA+TreatmentB,random=~1|Block/Plot,method="ML")
When I plot the residuals against the fitted values, I see a clear
positive trend (meaning that the variance increases with the mean).
I tried to solve this issue using weights=varPower(),
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,
2010 Mar 15
0
question regarding variance function in gls
Dear R-help members,
I have a question regarding how to use varComb function to specify a
variance function for the "weights" in the gls. I need to fit a
linear model with heteroscedasticity. The variance function is
exp(c0+nu0*W +nu1*W^2) where W is a covariate. Initially I want to use
varFunc to define my own variance function following the instruction in
the Pinheiro and Bates
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
2007 Jan 30
0
lme : Error in y[revOrder] - Fitted : non-conformable arrays
Greetings R-helpers,
I am attempting to fit an lme() while specifying a correlation
structure, but I'm getting into trouble long before I get to that point.
I am receiving the error:
Error in y[revOrder] - Fitted : non-conformable arrays
It doesn't seem to matter how simple or complex the model I specify is,
it always gives this same error message. This makes me suspect
something is
2003 Oct 21
2
Denominator Degrees of Freedom in lme() -- Adjusting and Understanding Them
Hello all.
I was wondering if there is any way to adjust the denominator degrees of
freedom in lme(). It seems to me that there is only one method that can be
used. As has been pointed out previously on the list, the denominator
degrees of freedom given by lme() do not match those given by SAS Proc
Mixed or HLM5. Proc Mixed, for example, offers five different options for
computing the
2012 Jun 07
0
[R-sig-ME] interpretation of main effect when interaction term being significant (ex. lme)
HI Dave,
My comment was based? on:
"
>The main question with this test was if the interaction term is significant (i.e. growth rate). However, my question is could I also look at the p-values of the main effects to
?>say if body mass increase significant with body mass?"
Here, the result shown were from the summary of the linear model.?? We report the p-values of the main
1999 Jul 01
1
lme
I am using rw0641.
In my continuing quest to understand repeated measures analysis, I again
return to lme. I exported the Potthoff and Roy data Orthodont.dat from
S-PLUS 4.5 to avoid capture errors and ran the examples in the R help. I
imported the data.frame with
data <- read.table("Orthodont.dat",header=T)
attach(data)
and created the objects
Orthodont.fit1 <-
2006 Nov 22
1
differences between aov and lme
Hi,
we have a split-plot experiment in which we measured the yield of crop
fields. The factors we studied were:
B : 3 blocks
I : 2 main plots for presence of Irrigation
V : 2 plots for Varieties
N : 3 levels of Nitrogen
Each block contains two plots (irrigated or not) . Each plot is divided
into two secondary parcels for the two varieties.
Each of these parcels is divided into three subplots
2012 May 31
1
anova of lme objects (model1, model2) gives different results depending on order of models
Hello-
I understand that it's convention, when comparing two models using the
anova function anova(model1, model2), to put the more "complicated" (for
want of a better word) model as the second model. However, I'm using lme
in the nlme package and I've found that the order of the models actually
gives opposite results. I'm not sure if this is supposed to be the case
2017 Mar 07
0
Potential clue for Bug 16975 - lme fixed sigma - inconsistent REML estimation
Dear list,
I was trying to create a VarClass for nlme to work with Fay-Herriot
(FH) models. The idea was to create a modification of VarComb that
instead of multiplying the variance functions made their sum (I called
it varSum). After some fails etc... I found that the I was not getting
the expected results because I needed to make sigma fixed. Trying to
find how to make sigma fixed I run into
2004 Jan 21
0
intervals in lme() and ill-defined models
There has been some recent discussion on this list about the value of using
intervals with lme() to check for whether a model is ill-defined. My
question is, what else can drive very large confidence intervals for the
variance components (or cause the error message "Error in
intervals.lme(Object) : Cannot get confidence intervals on var-cov
components: Non-positive definite approximate
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
2006 Oct 20
1
Translating lme code into lmer was: Mixed effect model in R
This question comes up periodically, probably enough to give it a proper
thread and maybe point to this thread for reference (similar to the
'conservative anova' thread not too long ago).
Moving from lme syntax, which is the function found in the nlme package,
to lmer syntax (found in lme4) is not too difficult. It is probably
useful to first explain what the differences are between the
2010 Dec 30
0
Panel Data Analysis in R
You wrote:
Ø Dear All,
Ø Can anyone provide me with reference notes(or steps) towards analysis of?? (un)balanced panel data in R.
Ø Thank you!
The "plm" package does panel data analysis in R. See the vignette at: cran.r-project.org/web/packages/plm/vignettes/plm.pdf. There are other similar articles by the same authors, Yves Croissant and
Giovanni Millo, and one of these is the
2004 Mar 20
1
contrast lme and glmmPQL and getting additional results...
I have a longitudinal data analysis project. There are 10 observations
on each of 15 units, and I'm estimating this with randomly varying
intercepts along with an AR1 correction for the error terms within
units. There is no correlation across units. Blundering around in R
for a long time, I found that for linear/gaussian models, I can use
either the MASS method glmmPQL (thanks to