growthModelComp(dataf, expVars = c(sizeNext~1, sizeNext~size, sizeNext~size + size2),
regressionType = "constantVar", testType = "AIC",
makePlot = FALSE, mainTitle = "", plotLegend = TRUE,
legendPos = "topright",...)
survModelComp(dataf, expVars = c(surv~1, surv~size, surv~size + size2), testType = "AIC",
makePlot = FALSE, mainTitle = "",ncuts=20, plotLegend = TRUE,
legendPos = "bottomleft", ...)c(sizeNext~1, sizeNext~size, sizeNext~size + size2).
growthModelComp. Defaults to constantVar.
loglike from the lm or glm object. For example "AIC" or "BIC". Defaults to "AIC".
FALSE.
main attribute in plots (if makePlot = TRUE. defaults to NULL.
FALSE.
dataframe with models and scores and list of containing the objects of class grObj and survObj for each model.
growthModelComp and survModelComp use a dataframe that has variables size and sizeNext to build a series of nested models. The default will build growth or survival objects with an intercept, an intercept and size, an an intercept with size and size^2 terms.
The models build use only lm or glm (and not mcmcGLMM for example) to estimate maximum likelihood estimates of functions. The testType (default "AIC" uses the loglike output from the lm or glm objects to score the model.
Plotting calls the functions plotGrowthModelComp or plotSurvModelComp to plot the objects. These functions can also be called after building the model comparison lists that are returned. If called outside of the initial building functions, they need to receive the GrowthObjects or SurvObjects list in the outputList from the build function. See plotGrowthModelComp and plotSurvModelComp for more details.
makeGrowthObj,makeSurvObj,plotGrowthModelComp, plotSurvModelComp
# Data with size and sizeNext
dff <- generateData()
growthModelComp(dff, makePlot = TRUE)
survModelComp(dff, makePlot = TRUE)
growthModelComp(dff, makePlot = TRUE, regressionType = "changingVar")
Run the code above in your browser using DataLab