Internal function to fit poisson Model
trajeR.POIS(
Y,
A,
X,
TCOV,
ng,
nx,
n,
nbeta,
nw,
ntheta,
period,
degre,
theta,
beta,
delta,
pi,
Method,
hessian,
itermax,
paraminit,
EMIRLS,
refgr
)
Matrix. A matrix containing the variables in the model.
Matrix. A matrix containing the time variable data.
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.
Matrix. An optional matrix containing the time covariate that influence the trajectory themselves. By default its value is NULL.
Integer. The number of groups.
Integer. The number of covariates.
Integer. Number of individuals.
Vector of integers. Number of beta parameters for each group.
Integer. Number of time dependent covariate.
Vector of integers. Number of theta parameters for each group.
Integer.
Vector of integer. The degree of every polynomial function.
Vector of real. The parameter for calculated the group membership probability.
Vector of real. The beta parameter.
Vector of real. The delta parameter.
Vector of real. The group membership probability.
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.
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 ginv
function int he package MASS.
If the method is EM or EMIWRLS, the hessian is calculated by using Louis method.
Integer. Indicate the maximal number of iteration for optim
function or for the EM algorithm.
Vector. The vector of initial parameters. By default trajeR
calculate the initial value
based of the range or the standard deviation.
Boolean. True if we use EMIRLS method.
Integer. The number of reference group. By default is 1.
return a object of class Trajectory.Pois
beta - vector of the parameter beta.
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 for the Poisson part.