ResidPlotLong | R Documentation |
These functions are essentially wrappers for a few DHARMa
functions that allow users to assess model
fit for models produced using glmmTMB
with or without random effects.
ResidPlotLong( Data, CountCol, GroupCol, ModNames, GroupPat = "^[[:alnum:]]+", Looped = T, Nsims = 1000, TestVals = T ) ResidPlotWide( Data, ModNames, GroupPat = "^[[:alnum:]]+", Nsims = 1000, TestVals = T )
Data |
The unquoted name of the data frame or data table containing the raw data models are based on. |
CountCol |
A character string specifying the name of the vector containing count data. |
GroupCol |
A character string specifying the name of the vector containing group information (e.g., order, species) for each observation. |
ModNames |
A character vector of model object names to assess model fit for. |
GroupPat |
A quoted regular expression that can be used to extract the character string representing
the column name containing the response variable of a model for (e.g., if the models "EpfuNb2" and "MyluNb2" are supplied for
the |
Looped |
A logical value indicating whether models were generated using a for loop or apply function that results in the "Data" value in the model output including an iterative subset. Defaults to "T". |
Nsims |
A number indicating the number of data simulations to run with |
TestVals |
A logical value indicating whether model fit test values should be generated alongside the plots this function creates. |
These functions output the plots generated by testResiduals
. Each resultant plot is named with
the model name followed by "SimResidPlot" (e.g., the plot associated with a model named "EpfuNb2" would be named
"EpfuNb2SimResidPlot"). If TestVals = T
, test values will also be generated. The resultant test values
are named with the model name follow by "ResidTests" (e.g., the test values associated with a model named
"EpfuNb2" would be named "EpfuNb2SimResidPlot").
#ResidPlotWide Example data("BatDataWide", "Epfu_Nb2", "Myev_Nb2", package = "EcoCountHelper") ResidPlotWide(BatDataWide, c("Epfu_Nb2", "Myev_Nb2"), "^[[:alpha:]]{4}") Epfu_Nb2ResidTests Epfu_Nb2SimResidPlot Myev_Nb2ResidTests Myev_Nb2SimResidPlot #ResidPlotLong Example data("BatDataLong", "Epfu_Nb2_Long", "Myev_Nb2_Long", package = "EcoCountHelper") ResidPlotLong(BatDataLong, "Count", "Species", c("Epfu_Nb2_Long", "Myev_Nb2_Long"), "^[[:alpha:]]{4}") Epfu_Nb2_LongResidTests Epfu_Nb2_LongSimResidPlot Myev_Nb2_LongResidTests Myev_Nb2_LongSimResidPlot
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.