profile.eicm | R Documentation |
Computes the profile (penalized) likelihood for all (or only one) estimated parameters in a EICM model.
## S3 method for class 'eicm'
profile(
fitted,
all.pars = TRUE,
parmatrix,
species,
parameter,
step = 0.3,
ncores = parallel::detectCores(),
alpha = 0.01,
...
)
fitted |
the fitted EICM model. |
all.pars |
logical. Compute for all model parameters? |
parmatrix |
if all.pars=FALSE, in which matrix is the parameter of interest, "env" or "sp"? |
species |
if all.pars=FALSE, in which row of |
parameter |
if all.pars=FALSE, in which column of |
step |
the step increments/decrements at which to compute the likelihood profile points. |
ncores |
the number of CPU cores to use when computing profiles for all parameters. |
alpha |
highest significance level that will be guaranteed for this profile. |
... |
additional argument(s) for methods |
Likelihod profiles will use the same regularization settings that were used in model fitting.
The same model object updated with a new profile
component.
Confidence intervals should not be computed on a model whose terms have been selected.
This function is optimized for computing profiles of multiple parameters simultaneously (in parallel).
# load the included parameterized model
data(truemodel)
# realize the model
occurrences <- predict(truemodel, nrepetitions=1)
# fit the model without species interactions
fitted <- eicm(occurrences, n.latent=2, mask.sp=0, do.selection=FALSE)$fitted.model
# compute likelihood profiles for all parameters
fitted <- profile(fitted, ncores=2)
# plot the first 9 profiles
par(mfrow=c(3, 3))
dummy <- lapply(fitted$profile[1:9], plot)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.