View source: R/InternalTrajeR.R
| trajeR.CNORM | R Documentation |
Internal function to fit CNORM Model
trajeR.CNORM(
Y,
A,
X,
TCOV,
ng,
nx,
n,
nbeta,
nw,
ntheta,
period,
degre,
theta,
beta,
sigma,
delta,
pi,
Method,
ssigma,
ymax,
ymin,
hessian,
itermax,
paraminit,
EMIRLS,
refgr,
control
)
Y |
Matrix, Formula, or a list of Formulas. A matrix containing the response variables, a single formula (e.g., |
A |
Matrix. A matrix containing the time variable data. Can be omitted if specified in the RHS of the |
X |
Matrix. The matrix of covariates modifying group membership probability. Includes an intercept. |
TCOV |
Matrix or Formula. An optional matrix (or one-sided formula) containing time-dependent covariates that influence the trajectories. |
ng |
Integer. The number of groups. |
nx |
Integer. The number of covariates. |
n |
Integer. Number of individuals. |
nbeta |
Vector of integers. Number of beta parameters for each group. |
nw |
Integer. Number of time-dependent covariates. |
ntheta |
Integer. Number of theta parameters for each group. |
period |
Integer. Number of measurement time points. |
degre |
Vector of integers. The degree of each polynomial function. The code adds 1 to these values internally. |
theta |
Vector of real. Initial parameters for group membership probability. |
beta |
List of vectors. Initial beta parameters for each group's trajectory. |
sigma |
Vector of real. Initial sigma parameters (standard deviations) for each group. |
delta |
List of vectors. Initial delta parameters for time-dependent covariates. |
pi |
Vector of real. Initial group membership probabilities. |
Method |
String. The estimation method. "L" for Likelihood, "EM" for Expectation-Maximization. |
ssigma |
Logical. For the CNORM model, if TRUE, a single shared standard deviation (sigma) is estimated for all groups. Default is FALSE. |
ymax |
Real. For the CNORM model, the maximum value for censoring. Defaults to max(Y) + 1. |
ymin |
Real. For the CNORM model, the minimum value for censoring. Defaults to min(Y) - 1. |
hessian |
Logical. If TRUE, the Hessian matrix is computed. Default is TRUE. |
itermax |
Integer. The maximum number of iterations for the optimization algorithm (like 'optim' or the EM loop). Default is 100. |
paraminit |
Vector. The vector of initial parameters. |
EMIRLS |
Logical. If TRUE, use the EM-IRLS method for estimation. |
refgr |
Integer. The reference group number. Default is 1. |
control |
A list of control parameters for the 'ucminf' optimization algorithm.
|
Returns an object of class 'Trajectory.CNORM'.
'beta': Vector of the final beta parameters.
'sigma': Vector of the final sigma parameters.
'delta': Vector of the final delta parameters (if 'nw > 0').
'theta': Vector of the final theta parameters for group membership.
'sd': Vector of the standard deviations of the parameters.
'tab': A data frame with parameter estimates, standard errors, T-values, and p-values.
'Model': The string "CNORM".
'groups': The number of groups.
'Names': The names of the parameters.
'Method': The estimation method used ("L" or "EM").
'Size': The number of individuals.
'Likelihood': The final log-likelihood value.
'Time': The time points for the first individual.
'degre': A vector with the polynomial degrees for each group.
'min', 'max': The censoring limits used.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.