[Ipmpack-users] Bug in makeSurvObj()

Bruce Kendall kendall at bren.ucsb.edu
Mon Aug 22 19:01:50 CEST 2016


I think I've found a bug in makeSurvObj(). When building a function without data (i.e., by specifying values for coeff), the specified coefficients are not actually applied to the model.

To reproduce this, run the following code multiple times and notice the inconsistent coefficients:

makeSurvObj(Formula = surv ~ -1 + size, coeff = c(1,1))

The problem seems to be in .createSurvObj(), which, unlike .createGrowthObj() and .createFecObj(), does not update the coefficients in the fit slot after fitting the model to dummy data.

I should also point out that this function often throws a warning, because when the dummy survivals are all zero or all one then "glm.fit: fitted probabilities numerically 0 or 1 occurred " results. This could be avoided by assigning, say, c(0,1,1) for the survival dummies.

Best,
Bruce

--
Bruce Kendall
kendall at bren.ucsb.edu <mailto:kendall at bren.ucsb.edu>
http://kendall.bren.ucsb.edu <http://kendall.bren.ucsb.edu/> 
Skype: brucekendall64

             #########################################
             ####   I am on sabbatical through Sept 2016   ####
             #########################################

=============================
Address through Aug. 2016:
—————————————————
Department of Zoology
University of Oxford
The Tinbergen Building
South Parks Road
Oxford
OX1 3PS
United Kingdom
Tel:   	+44 (0)1865 271139
Mob: 	+44 (0)7534 514781
Home:	+44 (0)1865 515349


===========================================
Permanent address:
—————————————————————————
Bren School of Environmental Science & Management
University of California, Santa Barbara
Santa Barbara, CA 93106-5131
USA
Tel: +1 (805) 893-7539
===========================================
















-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/ipmpack-users/attachments/20160822/3392d508/attachment.html>


More information about the IPMpack-users mailing list