Package 'SLTCA'

Title: SLTCA: Scalable and Robust Latent Trajectory Class Analysis Using Artificial Likelihood
Description: Conduct latent trajectory class analysis with longitudinal observations.
Authors: Kari Hart, Teng Fei and John Hanfelt
Maintainer: Teng Fei <[email protected]>
License: GPL (>= 2)
Version: 0.1.0
Built: 2024-10-17 03:44:23 UTC
Source: https://github.com/tengfei-emory/sltca

Help Index


Simulate a dataset which can be analyzed by SLTCA

Description

Simulate a dataset with longitudinal observations.

Usage

simulation(n)

Arguments

n

Sample size.

Value

Returns a data frame with 6 longitudinal features y.1 - y.6, including count (y.1 and y.2), binary (y.3 and y.4) and continuous (y.5 and y.6) type. Variable baselinecov is the baseline risk factor of latent classes. Variable latent is the true latent class labels.

Author(s)

Teng Fei. Email: [email protected]

Examples

dat <- simulation(500)

SLTCA: Scalable and Robust Latent Trajectory Class Analysis Using Artificial Likelihood

Description

Conduct latent trajectory class analysis with longitudinal observations.

Usage

SLTCA(k = 20, dat, num_class, id, time, num_obs, features, Y_dist, covx, ipw,
  stop, tol = 0.005, max = 50, varest = T, balanced = T, MSC = "EQIC",
  verbose = T)

Arguments

k

Number of random initialization to start the algorithm.

dat

Input data matrix.

num_class

Number of latent classes in the fitted model.

id

Column name in the data matrix 'dat' for the patient id.

time

Column name in the data matrix 'dat' for the time of longitudinal observations.

num_obs

Column name in the data matrix 'dat' for the number of longitudinal observations (number of visits).

features

A vector of column names in the data matrix 'dat' for the longitudinal observations.

Y_dist

A vector indicating the type of longitudinal observations. An element of Y_dist can be 'normal','bin', and 'poi' for continuous, binary and count data.

covx

A vector of column names in the data matrix 'dat' for baseline latent class risk factors.

ipw

Column name in the data matrix 'dat' for the inverse probability weights for missingness. ipw=1 if not specified.

stop

Stopping criterion for the algorithm. stop can be either 'tau' based on posterior probabilities or 'par' based on point estimation.

tol

A constant such that the algorithm stops if the stopping criterion is below this constant.

max

Maximum number of iterations if the algorithm does not converge.

varest

True or False: whether conduct variance estimation or not.

balanced

True or False: whether the longitudinal observations are equally spaced.

MSC

Model selection criteria: 'AQIC','BQIC' or 'EQIC'.

verbose

Output progress of fitting the model.

Value

A list with point estimates (alpha, beta0, beta1, phi, gamma), variance estimates (ASE), posterior membership probabilities (tau) and QICs (qic) of the latent trajectory class model.

Author(s)

Teng Fei. Email: [email protected]

References

Hart, Fei and Hanfelt (202x), Scalable and Robust Latent Trajectory Class Analysis Using Artificial Likelihood (in press).

Examples

dat <- simulation(500)

res <- SLTCA(k=1,dat,num_class=2,"id","time","num_obs",paste("y.",1:6,sep=''),
             Y_dist=c('poi','poi','bin','bin','normal','normal'),
             "baselinecov",1,stop="tau",tol=0.005,max=50,
             varest=T,balanced=T,MSC='EQIC',verbose=T)