Learn R Programming

RMark (version 3.0.0)

adjust.parameter.count: Adjust count of estimated parameters

Description

Modifies number of estimated parameters and the resulting AICc value for model selection.

Usage

adjust.parameter.count(model, npar)

Value

model: the mark model object with the adjustments made

Arguments

model

MARK model object

npar

Value of count of estimated parameters

Author

Jeff Laake

Details

When a model is run the parameter count determined by MARK is stored in results$npar and the AICc value is stored in results$AICc. If the argument adjust is set to TRUE in the call to run.mark.model and MARK determined that the design matrix was not full rank (i.e., the parameter count is less than the columns of the design matrix), then the parameter count from MARK is stored in results$npar.unadjusted and AICc in results$AICc.unadjusted and results$npar is set to the number of columns of the design matrix and results$AICc uses the assumed full rank value of npar. This function allows the parameter count to be reset to any value less than or equal to the number of columns in the design matrix. If results$npar.unadjusted exists it is kept as is. If it doesn't exist, then the current values of results$npar and results$AICc are stored in the .unadjusted fields to maintain the values from MARK, and the new adjusted values defined by the function argument npar are stored in results$npar and results$AICc. In the example below, the CJS model Phi(t)p(t) is fitted with the call to mark which defaults to adjust=TRUE. This is used to show how adjust.parameter.count can be used to adjust the count to 11 from the full rank count of 12. Alternatively, the argument adjust=FALSE can be added to prevent the adjustment which is appropriate in this case because Phi(6) and p(6) are confounded.

See Also

run.mark.model,model.table

Examples

Run this code
# \donttest{
# This example is excluded from testing to reduce package check time
data(dipper)
ptime=list(formula=~time)
Phitime=list(formula=~time)
dipper.phitime.ptime=mark(dipper,model.parameters=list(Phi=Phitime, p=ptime),delete=TRUE)
dipper.phitime.ptime=adjust.parameter.count(dipper.phitime.ptime,11)
dipper.phitime.ptime=mark(dipper,model.parameters=list(Phi=Phitime, p=ptime),
                           adjust=FALSE,delete=TRUE)
# }

Run the code above in your browser using DataLab