Learn R Programming

RMark (version 2.1.1)

compute.design.data: Compute design data for a specific parameter in the MARK model (internal use)

Description

For a specific type of parameter (e.g., Phi, p, r etc), it creates a data frame containing design data for each parameter of that type in the model as structured by an all different PIM (parameter information matrix). The design data are used in constructing the design matrix for MARK with user-specified model formulae as in make.mark.model.

Usage

compute.design.data(data, begin, num, type = "Triang",
    mix = FALSE, rows = 0, pim.type = "all", secondary,
    nstrata = 1, tostrata = FALSE, strata.labels = NULL,
    subtract.stratum = strata.labels, common.zero = FALSE,
    sub.stratum = 0)

Arguments

data
data list created by process.data
begin
0 for survival type, 1 for capture type
num
number of parameters relative to number of occasions (0 or -1)
type
type of parameter structure (Triang (STriang) or Square)
mix
if TRUE this is a mixed parameter
rows
number of rows relative to number of mixtures
pim.type
type of pim structure; either all (all-different) or time
secondary
TRUE if a parameter for the secondary periods of robust design
nstrata
number of strata for multistrata
tostrata
set to TRUE for transition parameters
strata.labels
labels for strata as identified in capture history
subtract.stratum
for each stratum, the to.strata that is computed by subtraction
common.zero
if TRUE, uses a common begin.time to set origin (0) for Time variable defaults to FALSE for legacy reasons but should be set to TRUE for models that share formula like p and c with the Time model
sub.stratum
the number of strata to subtract for parameters that use mlogit across strata like pi and Omega for RDMSOpenMisClass

Value

  • design.data: a data frame containing all of the design data fields for a particular type of parameter
  • groupgroup factor level
  • ageage factor level
  • timetime factor level
  • cohortcohort factor level
  • Ageage as a continuous variable
  • Timetime as a continuous variable
  • Cohortcohort as a continuous variable
  • mixturemixture factor level
  • other fieldsany factor variables used to define groups

Details

This function is called by make.design.data to create all of the default design data for a particular type of model and by add.design.data to add binned design data fields for a particular type of parameter. The design data created by this function include group, age, time and cohort as factors variables and continuous (non-factor) versions of all but group. In addition, if groups have been defined for the data, then a data column is added for each factor variable used to define the groups. Also for specific closed capture heterogeneity models (model="HetClosed", "FullHet", "HetHug", "FullHetHug") the data column mixture is added to the design data. The arguments for this function are defined for each model by the function setup.model.

See Also

make.design.data, add.design.data