[Ipmpack-users] Potential Bug in sensParams

Cian White ciwhite at tcd.ie
Wed Feb 8 23:49:19 CET 2017


Hi all,

I think I have found a bug in the sensParams function. I am modelling a
population of *Plantago lanceolata *and at one site there is changing
variance in the size of individuals, more variance in smaller plants and
less variance in larger plants.

I specify this in the *makeGrowthObject *function as follows:
CHgo <- makeGrowthObj(dataf = CH1, Formula = sizeNext ~ size, *regType =
"changingVar"*, Family = "gaussian")

I am able to build an IPM, plot sensitivity & elasticity matrices, stable
size distributions, extract lambda etc but when I try to examine the
sensitivities and elasticities of parameters I get an error.

> CHres <- sensParams(growObj = CHgo,
+                     survObj = CHso, fecObj = CHfo, discreteTrans =
CHdiscTrans,
+                     nBigMatrix = 100, minSize = CHminSize,
+                     maxSize = CHmaxSize)

Error in sensParams(growObj = CHgo, survObj = CHso, fecObj = CHfo,
discreteTrans = CHdiscTrans,  :
  no slot of name "sd" for this object of class "growthObjDeclineVar"

The sensParams function works fine when constantVar is specified.

I think it comes down to the fact that when the regression type is
specified as changingVar, a gls is used as opposed to a glm. It seems a
slot wasn't created for standard deviation when a gls is used and so when
the sensParams function goes looking for it, this error results.

I'll be happily pointed out the error in what I am doing but I can't find a
way around it. I'd also like to thank the creators of IPMpack, it's an
amazing tool and the appendix is extremely helpful.

Thanks,

Cian White
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/ipmpack-users/attachments/20170208/e0c718b0/attachment.html>


More information about the IPMpack-users mailing list