View source: R/InternalTrajeR.R
| trajeR.LOGIT | R Documentation |
Internal function to fit LOGIT Model
trajeR.LOGIT(
Y,
A,
X,
TCOV,
ng,
nx,
n,
nbeta,
nw,
ntheta,
period,
degre,
theta,
beta,
delta,
pi,
Method,
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. Required if using a single formula or if 'degre' is not provided. |
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. |
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. |
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.LOGIT'.
'beta': Vector of the final beta 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 "LOGIT".
'groups': The number of groups.
'Names': The names of the parameters.
'Method': The estimation method used.
'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.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.