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 )
Y |
Matrix. A matrix containing the variables in the model. |
A |
Matrix. A matrix containing the time variable data. |
X |
Matrix. An optional matrix that modify the probability of belong to group. By default its value is a matrix with one column with value 1. |
TCOV |
Matrix. An optional matrix containing the time covariate that influence the trajectory themselves. By default its value is NULL. |
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 covariate. |
ntheta |
Vector of integers. Number of theta parameters for each group. |
period |
Integer. |
degre |
Vector of integer. The degree of every polynomial function. |
theta |
Vector of real. The parameter for calculated the group membership probability. |
beta |
Vector of real. The beta parameter. |
sigma |
Vector of real. The sigma parameter. |
delta |
Vector of real. The delta parameter. |
pi |
Vector of real. The group membership probability. |
Method |
String. Determine the method used for find the parameters of the model. The value are L for the Maximum Likelihood Estimation, EM for Expectation Maximization method with quasi newton method inside, EMIWRLS for Expectation Maximization method with Iterative Weighted Least Square. |
ssigma |
Logical. By default its value is FALSE. For the CNORM model, indicate if we want the same sigma for all normal density function. |
ymax |
Real. For the CNORM model, indicate the maximum value of the data. It concern only the model with censored data. By default its value is the maximum value of the data plus 1. |
ymin |
Real. For the CNORM model, indicate the minimum value of the data. It concern only the model with censored data. By default its value is the maximum value of the data minus 1. |
hessian |
Logical. Indicate if we want calculate the hessian matrix. Default is FALSE.
If the method use is Likelihood, the hessian is calculated by inverting the Information's Fisher Matrix.
To avoid numerically singular matrix we find the pseudo inverse matrix by using the |
itermax |
Integer. Indicate the maximal number of iteration for |
paraminit |
Vector. The vector of initial parameters. By default |
EMIRLS |
Boolean. True if we use EMIRLS method. |
refgr |
Integer. The number of reference group. By default is 1. |
return a object of class Trajectory.CNORM
beta - vector of the parameter beta.
sigma - vector of the parameters sigma.
delta - vector of the parameter delta. Only if we use time covariate.
theta - vector with the parameter theta if there exist a coavriate X that modify the probability or the probability of group membership.
sd - vector of the standard deviation of the parameters.
tab - a matrix with all the parameters and standard deviation.
Model - a string with the model used.
groups - a integer with the number of group.
Names - strings with the name of the parameters.
Method - a string with the method used.
Size - a integer with the number of individuals.
Likelihood - a real with the Likelihood obtained by the parameters.
Time - a vector with the first row of time values.
degre - a vector with the degree of the polynomial shape.
min - a real with the minimum value for censored data.
max - a real with the maximum value for censored data.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.