h_get_kr_comp {mmrm} | R Documentation |
Obtain Kenward-Roger Adjustment Components
Description
Obtains the components needed downstream for the computation of Kenward-Roger degrees of freedom.
Used in mmrm()
fitting if method is "Kenward-Roger".
Usage
h_get_kr_comp(tmb_data, theta)
Arguments
tmb_data |
( |
theta |
( |
Details
the function returns a named list, P
, Q
and R
, which corresponds to the
paper in 1997. The matrices are stacked in columns so that P
, Q
and R
has the same
column number(number of beta parameters). The number of rows, is dependent on
the total number of theta and number of groups, if the fit is a grouped mmrm.
For P
matrix, it is stacked sequentially. For Q
and R
matrix, it is stacked so
that the Q_{ij}
and R_{ij}
is stacked from j
then to i
, i.e. R_{i1}
, R_{i2}
, etc.
Q
and R
only contains intra-group results and inter-group results should be all zero matrices
so they are not stacked in the result.
Value
Named list with elements:
-
P
:matrix
ofP
component. -
Q
:matrix
ofQ
component. -
R
:matrix
ofR
component.