Wrapper function to build the IPM corresponding to every level of the discrete covariate, and return a list of these.
1 2 3 4 5 6 7 8 9  sampleSequentialIPMs(dataf, nBigMatrix = 10, minSize = 2,
maxSize = 10,
integrateType = "midpoint", correction = "none",
explSurv = surv ~ size + size2 + covariate,
explGrow = sizeNext ~ size + size2 + covariate,
regType = "constantVar",
explFec = fec ~size, Family="gaussian",
Transform = "none",
fecConstants = data.frame(NA))

dataf 
a dataframe with columns ‘size’, ‘sizeNext’, 'surv', 'fec', 'covariate', 'covariatel'; and 'age' indicating which individuals are seedlings for identifying the mean and variance in seedling size. 
nBigMatrix 
number of bins in size. 
minSize 
minimum size. 
maxSize 
maximum size. 
integrateType 
integration type. 
correction 
correction for unintentional eviction (individuals move outside the size range of the IPM). This correction redistributes individuals so that column sums of the IPM match expected survival for that column. 
explSurv 
Formula and explanatory variables used in the survival model. 
explGrow 
explanatory variables used in the growth model. 
regType 
Formula and regression Type for growth (normal density function, truncated, etc). 
explFec 
explanatory variables used in the fecundity. 
Family 
a character vector containing the names of the families to be used for the glms, e.g., binomial, poisson, etc. Again, these must appear in the order defined by the list of formula 
Transform 
a character vector containing the names of the transforms to be used for the response variables, e.g., log, sqrt, 1, etc. Again, these must appear in the order defined by the list of formula 
fecConstants 
data.frame of constant multipliers for the fecundity model. 
list of matrices corresponding to covariates, in order.
Formerly makeListIPMs(). makeListIPMs() is no longer supported but has been hidden (.makeListIPMs()) and can be accessed for backward compatibility.
Cory Merow, C. Jessica E. Metcalf, Sean M. McMahon, Roberto SalgueroGomez, Eelke Jongejans.
1 2  dff < generateData()
IPMlist < sampleSequentialIPMs(dff, Transform="log")

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.
Please suggest features or report bugs with the GitHub issue tracker.
All documentation is copyright its authors; we didn't write any of that.