As noted below, it is hard to diagnose the specific issue. But, as a
recommendation, I would suggest using lmer and then investigating the parameters
of the model using the MCMCsamp() function. You can then do all diagnostics
using the various functions in the coda package as MCMCsamp() returns an object
of class mcmc.
-----Original Message-----
From: r-help-bounces@stat.math.ethz.ch on behalf of Andrew Robinson
Sent: Mon 5/29/2006 7:22 AM
To: Pryseley Assam
Cc: R-Help Discussion
Subject: Re: [R] query: lme
I'm not exactly certain, but it seems to me that you're including a
factor in the LHS of the random term. You might write down the model
that you're fitting, and reflect upon it. Of course, there may be a
perfectly good reason, but that does make for an exceptionally
complicated model. You might try to reinvent your question so that it
is matched by a simpler model. Of course, I'm only speculating,
because you haven't told us anything about the data, or your
intentions.
In general, you might find that the variance covariance matrix of the
random effects not being positive definite could be a sign of a model
that is not a good match with the available data.
Cheers
Andrew
On Mon, May 29, 2006 at 02:15:54AM -0700, Pryseley Assam
wrote:> Good R-users,
>
> I have difficulties accessing the variance components for an lme fit when
the variance covariance matrix of the random effects is not positive definite.
>
> For example, i fit the following model:
>
> ggg <- lme (ST~ -1 + as.factor(endp):Z.sas + as.factor(endp),
data=dat2a,
> random=~-1 + as.factor(endp) + as.factor(endp):Z.sas|as.factor(trials),
> correlation = corSymm(form=~1|as.factor(trials)/as.factor(id)),
weights=varIdent(form=~1|endp))
>
> intervals(ggg, which="var-cov")
>
> when i try to access the variance components using the
'intervals' function i get the following error message:
>
> "Error in intervals.lme(ggg, which = "var-cov") :
> Cannot get confidence intervals on var-cov components: Non-positive
definite approximate variance-covariance"
>
> Is there a way out of this? or better still
> Is there another function through which i can access these variance
components other than the intervals function?
>
> Kind regards
> Pryseley
>
>
> ---------------------------------
> Sneak preview the all-new Yahoo.com. It's not radically different.
Just radically better.
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help@stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide!
http://www.R-project.org/posting-guide.html
--
Andrew Robinson
Department of Mathematics and Statistics Tel: +61-3-8344-9763
University of Melbourne, VIC 3010 Australia Fax: +61-3-8344-4599
Email: a.robinson@ms.unimelb.edu.au http://www.ms.unimelb.edu.au
______________________________________________
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[[alternative HTML version deleted]]