mspathCalculator {mspath} | R Documentation |
Make mspathCalculator
objects. This is primarily
for internal use.
mspathCalculator(do.what, params, allinits, misc, subject, time, state, qvector, evector, covvec, constrvec, misccovvec, miscconstrvec, baseconstrvec, basemiscconstrvec, pathvars, pathoffset, pathconstrvec, initprobs, nstates, nintens, nintenseffs, nmisc, nmisceffs, nobs, npts, ncovs, ncoveffs, nmisccovs, nmisccoveffs, npatheffs, isexact, fixedpars, stepnumerator, stepdenominator) mspathCalculatorFromArgs(args, do.what=1)
See mspath
and the documentation on the C++
code
for the full details.
do.what |
Type of computation to perform, as interpreted by the
C++ code. |
params |
Ordinarily, the precise values here may be irrelevant, since they can be reset on specific calls to calculate. However, the size of this argument must be correct. |
allinits |
The “initial” values for all fixed and free
parameters. Only the fixed values are used; the rest come from
params , which may be reset during the life of the
calculator. |
misc |
0 = no misclassification; 1 = full misclassification; 2 = simple, fixed misclassification. |
subject |
The ID, which must be an integer, for each row of data. The ID's should be sorted in ascending order. |
time |
time of each observation, in ascending order within cases. |
state |
The state of each observation. States should be numbered
1 through nstates . |
qvector |
Vectorized matrix of allowed transitions, 1 for allowed, 0 for not allowed. |
evector |
Vectorized matrix of allowed misclassifications (on
relevant if do.what is not 0). |
covvec |
vectorized matrix of covariate values. |
constrvec |
constraints for each covariate |
misccovvec |
Vectorized matrix of covariate values for
misclassification (only relevant if misc = 1). |
miscconstrvec |
list of constraints for each misclassification covariate |
baseconstrvec |
constraints on baseline transition intensities |
basemiscconstrvec |
constraints on baseline misclassification probabilities |
pathvars |
character vector of the names of
history-dependent variables. |
pathoffset |
add this double to every time 0 in the paths |
pathconstrvec |
constraints on path effects on intensities |
initprobs |
initial state occupancy probabilities |
nstates |
number of states |
nintens |
number of intensity parameters |
nintenseffs |
number of distinct intensity parameters |
nmisc |
number of misclassification rates |
nmisceffs |
number of distinct misclassification rates |
nobs |
number of observations in the data set |
npts |
number of individuals/cases in the data set |
ncovs |
number of covariates on transition rates |
ncoveffs |
number of distinct covariate effect parameters |
nmisccovs |
number of distinct misclassification parameters |
nmisccoveffs |
number of distinct misclassification effects |
npatheffs |
number of distinct path (history) effects on transitions |
isexact |
non-0 if we observed time of entry to absorbing states exactly (e.g., death) |
fixedpars |
which parameters to fix |
stepnumerator |
integer This divided by
stepdenominator give the maximum step size in the discrete
approximation, in the same scale as time . |
stepdenominator |
integer see stepnumerator |
args |
These arguments for mspathCalculatorFromArgs ,
unlike those for mspathCalculator , must be processed with
as.integer and other appropriate forms for the call to
C++ .
|
Returns a new mspathCalculator object.
To use this properly you need to use the correct 1 or 0-based indexing (which varies by argument) and know the exact rules for unrolling matrices into vectors.
Ross Boylan
mspathCalculator
,
mspath
, and the documentation for the C++
code.