soprobMarkovOrd
soprobMarkovOrd.RdState Occupancy Probabilities for First-Order Markov Ordinal Model
Arguments
- y
a vector of possible y values in order (numeric, character, factor)
- times
vector of measurement times
- initial
initial value of
y(baseline state; numeric, character, factr)- absorb
vector of absorbing states, a subset of
y. The default is no absorbing states. (numeric, character, factor)- intercepts
vector of intercepts in the proportional odds model, with length one less than the length of
y- g
a user-specified function of three or more arguments which in order are
yprev- the value ofyat the previous time, the current timet, thegapbetween the previous time and the current time, an optional (usually named) covariate vectorX, and optional arguments such as a regression coefficient value to simulate from. The function needs to allowyprevto be a vector andyprevmust not include any absorbing states. Thegfunction returns the linear predictor for the proportional odds model aside fromintercepts. The returned value must be a matrix with row names taken fromyprev. If the model is a proportional odds model, the returned value must be one column. If it is a partial proportional odds model, the value must have one column for each distinct value of the response variable Y after the first one, with the levels of Y used as optional column names. So columns correspond tointercepts. The different columns are used fory-specific contributions to the linear predictor (aside fromintercepts) for a partial or constrained partial proportional odds model. Parameters for partial proportional odds effects may be included in the ... arguments.- ...
additional arguments to pass to
gsuch as covariate settings
Value
matrix with rows corresponding to times and columns corresponding to states, with values equal to exact state occupancy probabilities