Coder Social home page Coder Social logo

tengfei-emory / sltca Goto Github PK

View Code? Open in Web Editor NEW
0.0 0.0 0.0 95 KB

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

License: GNU General Public License v3.0

R 100.00%
latent-class-analysis latent-trajectories

sltca's Introduction

SLTCA

CRAN Status Badge Downloads badge Total downloads

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

News

The package is on CRAN now. This repository will mainly serve as a platform for bug reporting (at Issues) while we will post the lastest version on CRAN. To access the latest version on GitHub, please go to branch CRAN. Thanks for considering using our software!

Installation Guide

install.packages("SLTCA")
library(SLTCA)

Currently SLTCA supports R version >= 3.5.0.

Example: analyze a simulated dataset

Data simulation

By default, the function simulation(n) generates a dataset with n observations under the scenario 1 described by Hart, Fei and Hanfelt (2020).

# generate a dataset with 500 individuals
dat <- simulation(500)

Specifically, it returns a data frame of 2 latent classes with 6 longitudinal features y.1 to y.6, including count (y.1 and y.2), binary (y.3 and y.4) and continuous (y.5 and y.6) features. The data frame also consists of individual identifiers (id), corresponding time of longitudinal features (time) and the number of visit (num_obs). In addition, variable baselinecov is a binary baseline risk factor of latent classes. Variable latent is the true latent class labels.

Model fitting

The analysis for the dataset dat can be conducted by running SLTCA function:

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

Please refer to the function documentation for more details.

References

Hart, Fei and Hanfelt (2020), Scalable and Robust Latent Trajectory Class Analysis Using Artificial Likelihood. Biometrics, Accepted Author Manuscript. doi:10.1111/biom.13366

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.