[R] Proper syntax for using varConstPower in nlme
kingsfordjones at gmail.com
Sun Oct 18 20:27:29 CEST 2009
On Fri, Oct 16, 2009 at 3:56 PM, Michael A. Gilchrist <mikeg at utk.edu> wrote:
> Hi Dieter,
> Thanks for the reply. I had played with the initial conditions, but
> apparently not enough. I finally found some that avoided the singularity
> issue. Many thanks.
> More generally, I went over the documentation yet again in P&B and I still
> find it a bit confusing. They talk about using form = ~fitted(.) when
> discussing varPower, but the rest of the documentation seems to suggest that
> "form = ~..." should be used to indicate which covariate you assume the
> variance changes with.
> Could you or someone else provide some clarification?
I don't have P&B in front of me, but see the 'form' agument definition
on the help page for any of the variance structures depending on a
covariate (varPower, varConstPower or varExp). The ~fitted(.) and
~resid(.) notation specify that you would like the variance covariate
to be a function of the model being fit (the fitted values or
residuals), in which case the variance parameter \delta and the model
body are estimated iteratively. Conversely, if you specify a constant
variance covariate such as ~age, there is no need for updating of the
variance covariate during optimization.
> On Fri, 16 Oct 2009, Dieter Menne wrote:
>> Michael A. Gilchrist wrote:
>>>> nlme(Count ~ quad.PBMC.model(aL, aN, T0),
>>> + data = tissueData,
>>> + weights = varConstPower(form =~ Count),
>>> + start = list( fixed = c(rep(1000, 8), -2, -2) ),
>>> + fixed = list(T0 ~ TypeTissue-1, aL ~ 1, aN ~ 1),
>>> + random = aL + aN ~ 1|Tissue
>>> + )
>>> Error in MEestimate(nlmeSt, grpShrunk) :
>>> Singularity in backsolve at level 0, block 1
>> You could use varPower(form=~fitted()) (the default, also varPower()). In
>> experience this runs into some limitation quickly with nlme, because some
>> boundary conditions make convergence fail.
>> Try varPower(fixed = 0.5) first and play with the number.
>> You should only use varConstPower when you have problems with values that
>> cover a large range, coming close to zero, which could make varPower go
>> Always do a plot of the result; the default plot gives you residual, and
>> some indication how to proceed.
>> View this message in context:
>> Sent from the R help mailing list archive at Nabble.com.
>> R-help at r-project.org mailing list
>> PLEASE do read the posting guide
>> and provide commented, minimal, self-contained, reproducible code.
> R-help at r-project.org mailing list
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
More information about the R-help