Last data update: 2014.03.03

R: Latent Class Analysis (LCA) and model selection for pedigree...
LCAextend-packageR Documentation

Latent Class Analysis (LCA) and model selection for pedigree data

Description

Description: This package performs a Latent Class Analysis of phenotypic measurements in pedigrees and a model selection based on one of two methods: likelihood-based cross-validation and Bayesian Information Criterion. It computes also individual and triplet child-parents weights in a pedigree using an upward-downward algorithm. It takes into account the familial dependence defined by the pedigree structure by considering that a class of a child depends on his parents classes via triplet-transition probabilities of the classes. The package handles the case where measurements are available on all subjects and the case where measurements are available only on symptomatic (i.e. affected) subjects. Distributions for discrete (or ordinal) and continous data are currently implemented. The package can deal with missing data.

Details

Package: LCAextend
Type: Package
Version: 1.0
Date: 2011-11-15
License: GPL
LazyLoad: yes

Author(s)

Arafat TAYEB <arafat.tayeb@crulrg.ulaval.ca>, Alexandre BUREAU <alexandre.bureau@msp.ulaval.ca> and Aurelie Labbe <aurelie.labbe@mcgill.ca>
Maintainer: Alexandre BUREAU <alexandre.bureau@msp.ulaval.ca>

References

TAYEB, A. LABBE, A., BUREAU, A. and MERETTE, C. (2011) Solving Genetic Heterogeneity in Extended Families by Identifying Sub-types of Complex Diseases. Computational Statistics, 26(3): 539-560. DOI: 10.1007/s00180-010-0224-2,

LABBE, A., BUREAU, A. and MERETTE, C. (2009) Integration of Genetic Familial Dependence Structure in Latent Class Models. The International Journal of Biostatistics, 5(1): Article 6.

Examples

#data
data(ped.cont)
fam <- ped.cont[,1]
#the function applied for the two first families of ped.cont
res <- model.select(ped.cont[fam%in%1:2,],distribution="normal",trans.const=TRUE,
             optim.indep.norm,optim.probs.indic=c(TRUE,TRUE,TRUE,TRUE),
             famdep=TRUE,selec="bic",K.vec=1:3,tol=0.001,x=NULL,var.list=NULL)
plot(1:3,res$bic,type="l",col="blue",xlab="K",ylab="BIC",main="model 
    selection using BIC")

Results


R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(LCAextend)
Loading required package: boot
Loading required package: mvtnorm
Loading required package: rms
Loading required package: Hmisc
Loading required package: lattice

Attaching package: 'lattice'

The following object is masked from 'package:boot':

    melanoma

Loading required package: survival

Attaching package: 'survival'

The following object is masked from 'package:boot':

    aml

Loading required package: Formula
Loading required package: ggplot2

Attaching package: 'Hmisc'

The following objects are masked from 'package:base':

    format.pval, round.POSIXt, trunc.POSIXt, units

Loading required package: SparseM

Attaching package: 'SparseM'

The following object is masked from 'package:base':

    backsolve

Loading required package: kinship2
Loading required package: Matrix
Loading required package: quadprog
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/LCAextend/LCAextend-package.Rd_%03d_medium.png", width=480, height=480)
> ### Name: LCAextend-package
> ### Title: Latent Class Analysis (LCA) and model selection for pedigree
> ###   data
> ### Aliases: LCAextend-package LCAextend
> ### Keywords: package
> 
> ### ** Examples
> 
> #data
> data(ped.cont)
> fam <- ped.cont[,1]
> #the function applied for the two first families of ped.cont
> res <- model.select(ped.cont[fam%in%1:2,],distribution="normal",trans.const=TRUE,
+              optim.indep.norm,optim.probs.indic=c(TRUE,TRUE,TRUE,TRUE),
+              famdep=TRUE,selec="bic",K.vec=1:3,tol=0.001,x=NULL,var.list=NULL)
model  1 
CHECK OF ALL PEDIGREES DONE
%%%%%%%%%%%%%%%%%%%%%%%%%%% iteration 1 %%%%%%%%%%%%%%%%%%%%%%%%%%%%
log-likelihood :  -80.74749 
%%%%%%%%%%%%%%%%%%%%%%%%%%% iteration 2 %%%%%%%%%%%%%%%%%%%%%%%%%%%%
log-likelihood :  -74.14456 
%%%%%%%%%%%%%%%%%%%%%%%%%%% iteration 3 %%%%%%%%%%%%%%%%%%%%%%%%%%%%
log-likelihood :  -73.3871 
%%%%%%%%%%%%%%%%%%%%%%%%%%% iteration 4 %%%%%%%%%%%%%%%%%%%%%%%%%%%%
log-likelihood :  -73.03544 
%%%%%%%%%%%%%%%%%%%%%%%%%%% iteration 5 %%%%%%%%%%%%%%%%%%%%%%%%%%%%
log-likelihood :  -72.79789 
%%%%%%%%%%%%%%%%%%%%%%%%%%% iteration 6 %%%%%%%%%%%%%%%%%%%%%%%%%%%%
log-likelihood :  -72.63147 
%%%%%%%%%%%%%%%%%%%%%%%%%%% iteration 7 %%%%%%%%%%%%%%%%%%%%%%%%%%%%
log-likelihood :  -72.51306 
%%%%%%%%%%%%%%%%%%%%%%%%%%% iteration 8 %%%%%%%%%%%%%%%%%%%%%%%%%%%%
log-likelihood :  -72.42792 
%%%%%%%%%%%%%%%%%%%%%%%%%%% iteration 9 %%%%%%%%%%%%%%%%%%%%%%%%%%%%
log-likelihood :  -72.36621 
%%%%%%%%%%%%%%%%%%%%%%%%%%% iteration 10 %%%%%%%%%%%%%%%%%%%%%%%%%%%%
log-likelihood :  -72.32117 
%%%%%%%%%%%%%%%%%%%%%%%%%%% iteration 11 %%%%%%%%%%%%%%%%%%%%%%%%%%%%
log-likelihood :  -72.28808 
%%%%%%%%%%%%%%%%%%%%%%%%%%% iteration 12 %%%%%%%%%%%%%%%%%%%%%%%%%%%%
log-likelihood :  -72.2636 
%%%%%%%%%%%%%%%%%%%%%%%%%%% iteration 13 %%%%%%%%%%%%%%%%%%%%%%%%%%%%
log-likelihood :  -72.24533 
%%%%%%%%%%%%%%%%%%%%%%%%%%% iteration 14 %%%%%%%%%%%%%%%%%%%%%%%%%%%%
log-likelihood :  -72.23159 
%%%%%%%%%%%%%%%%%%%%%%%%%%% iteration 15 %%%%%%%%%%%%%%%%%%%%%%%%%%%%
log-likelihood :  -72.22114 
%%%%%%%%%%%%%%%%%%%%%%%%%%% iteration 16 %%%%%%%%%%%%%%%%%%%%%%%%%%%%
log-likelihood :  -72.21312 
%%%%%%%%%%%%%%%%%%%%%%%%%%% iteration 17 %%%%%%%%%%%%%%%%%%%%%%%%%%%%
log-likelihood :  -72.20687 
%%%%%%%%%%%%%%%%%%%%%%%%%%% iteration 18 %%%%%%%%%%%%%%%%%%%%%%%%%%%%
log-likelihood :  -72.20194 
%%%%%%%%%%%%%%%%%%%%%%%%%%% iteration 19 %%%%%%%%%%%%%%%%%%%%%%%%%%%%
log-likelihood :  -72.198 
%%%%%%%%%%%%%%%%%%%%%%%%%%% iteration 20 %%%%%%%%%%%%%%%%%%%%%%%%%%%%
log-likelihood :  -72.19481 
%%%%%%%%%%%%%%%%%%%%%%%%%%% iteration 21 %%%%%%%%%%%%%%%%%%%%%%%%%%%%
log-likelihood :  -72.19218 
%%%%%%%%%%%%%%%%%%%%%%%%%%% iteration 22 %%%%%%%%%%%%%%%%%%%%%%%%%%%%
log-likelihood :  -72.18999 
%%%%%%%%%%%%%%%%%%%%%%%%%%% iteration 23 %%%%%%%%%%%%%%%%%%%%%%%%%%%%
log-likelihood :  -72.18814 
%%%%%%%%%%%%%%%%%%%%%%%%%%% iteration 24 %%%%%%%%%%%%%%%%%%%%%%%%%%%%
log-likelihood :  -72.18655 
%%%%%%%%%%%%%%%%%%%%%%%%%%% iteration 25 %%%%%%%%%%%%%%%%%%%%%%%%%%%%
log-likelihood :  -72.18518 
%%%%%%%%%%%%%%%%%%%%%%%%%%% iteration 26 %%%%%%%%%%%%%%%%%%%%%%%%%%%%
log-likelihood :  -72.18398 
%%%%%%%%%%%%%%%%%%%%%%%%%%% iteration 27 %%%%%%%%%%%%%%%%%%%%%%%%%%%%
log-likelihood :  -72.18292 
%%%%%%%%%%%%%%%%%%%%%%%%%%% iteration 28 %%%%%%%%%%%%%%%%%%%%%%%%%%%%
log-likelihood :  -72.18198 
model  2 
CHECK OF ALL PEDIGREES DONE
%%%%%%%%%%%%%%%%%%%%%%%%%%% iteration 1 %%%%%%%%%%%%%%%%%%%%%%%%%%%%
log-likelihood :  -80.94363 
%%%%%%%%%%%%%%%%%%%%%%%%%%% iteration 2 %%%%%%%%%%%%%%%%%%%%%%%%%%%%
log-likelihood :  -70.71699 
%%%%%%%%%%%%%%%%%%%%%%%%%%% iteration 3 %%%%%%%%%%%%%%%%%%%%%%%%%%%%
log-likelihood :  -67.19511 
%%%%%%%%%%%%%%%%%%%%%%%%%%% iteration 4 %%%%%%%%%%%%%%%%%%%%%%%%%%%%
log-likelihood :  -64.02486 
%%%%%%%%%%%%%%%%%%%%%%%%%%% iteration 5 %%%%%%%%%%%%%%%%%%%%%%%%%%%%
log-likelihood :  -61.86961 
%%%%%%%%%%%%%%%%%%%%%%%%%%% iteration 6 %%%%%%%%%%%%%%%%%%%%%%%%%%%%
log-likelihood :  -61.08025 
%%%%%%%%%%%%%%%%%%%%%%%%%%% iteration 7 %%%%%%%%%%%%%%%%%%%%%%%%%%%%
log-likelihood :  -60.75922 
%%%%%%%%%%%%%%%%%%%%%%%%%%% iteration 8 %%%%%%%%%%%%%%%%%%%%%%%%%%%%
log-likelihood :  -60.59026 
%%%%%%%%%%%%%%%%%%%%%%%%%%% iteration 9 %%%%%%%%%%%%%%%%%%%%%%%%%%%%
log-likelihood :  -60.48729 
%%%%%%%%%%%%%%%%%%%%%%%%%%% iteration 10 %%%%%%%%%%%%%%%%%%%%%%%%%%%%
log-likelihood :  -60.41981 
%%%%%%%%%%%%%%%%%%%%%%%%%%% iteration 11 %%%%%%%%%%%%%%%%%%%%%%%%%%%%
log-likelihood :  -60.37363 
%%%%%%%%%%%%%%%%%%%%%%%%%%% iteration 12 %%%%%%%%%%%%%%%%%%%%%%%%%%%%
log-likelihood :  -60.341 
%%%%%%%%%%%%%%%%%%%%%%%%%%% iteration 13 %%%%%%%%%%%%%%%%%%%%%%%%%%%%
log-likelihood :  -60.31734 
%%%%%%%%%%%%%%%%%%%%%%%%%%% iteration 14 %%%%%%%%%%%%%%%%%%%%%%%%%%%%
log-likelihood :  -60.29981 
%%%%%%%%%%%%%%%%%%%%%%%%%%% iteration 15 %%%%%%%%%%%%%%%%%%%%%%%%%%%%
log-likelihood :  -60.28658 
%%%%%%%%%%%%%%%%%%%%%%%%%%% iteration 16 %%%%%%%%%%%%%%%%%%%%%%%%%%%%
log-likelihood :  -60.27643 
%%%%%%%%%%%%%%%%%%%%%%%%%%% iteration 17 %%%%%%%%%%%%%%%%%%%%%%%%%%%%
log-likelihood :  -60.26852 
%%%%%%%%%%%%%%%%%%%%%%%%%%% iteration 18 %%%%%%%%%%%%%%%%%%%%%%%%%%%%
log-likelihood :  -60.26227 
%%%%%%%%%%%%%%%%%%%%%%%%%%% iteration 19 %%%%%%%%%%%%%%%%%%%%%%%%%%%%
log-likelihood :  -60.25727 
%%%%%%%%%%%%%%%%%%%%%%%%%%% iteration 20 %%%%%%%%%%%%%%%%%%%%%%%%%%%%
log-likelihood :  -60.25322 
%%%%%%%%%%%%%%%%%%%%%%%%%%% iteration 21 %%%%%%%%%%%%%%%%%%%%%%%%%%%%
log-likelihood :  -60.24991 
%%%%%%%%%%%%%%%%%%%%%%%%%%% iteration 22 %%%%%%%%%%%%%%%%%%%%%%%%%%%%
log-likelihood :  -60.24718 
%%%%%%%%%%%%%%%%%%%%%%%%%%% iteration 23 %%%%%%%%%%%%%%%%%%%%%%%%%%%%
log-likelihood :  -60.24489 
%%%%%%%%%%%%%%%%%%%%%%%%%%% iteration 24 %%%%%%%%%%%%%%%%%%%%%%%%%%%%
log-likelihood :  -60.24298 
%%%%%%%%%%%%%%%%%%%%%%%%%%% iteration 25 %%%%%%%%%%%%%%%%%%%%%%%%%%%%
log-likelihood :  -60.24136 
%%%%%%%%%%%%%%%%%%%%%%%%%%% iteration 26 %%%%%%%%%%%%%%%%%%%%%%%%%%%%
log-likelihood :  -60.23998 
%%%%%%%%%%%%%%%%%%%%%%%%%%% iteration 27 %%%%%%%%%%%%%%%%%%%%%%%%%%%%
log-likelihood :  -60.2388 
%%%%%%%%%%%%%%%%%%%%%%%%%%% iteration 28 %%%%%%%%%%%%%%%%%%%%%%%%%%%%
log-likelihood :  -60.23778 
%%%%%%%%%%%%%%%%%%%%%%%%%%% iteration 29 %%%%%%%%%%%%%%%%%%%%%%%%%%%%
log-likelihood :  -60.23691 
model  3 
CHECK OF ALL PEDIGREES DONE
%%%%%%%%%%%%%%%%%%%%%%%%%%% iteration 1 %%%%%%%%%%%%%%%%%%%%%%%%%%%%
log-likelihood :  -78.70432 
%%%%%%%%%%%%%%%%%%%%%%%%%%% iteration 2 %%%%%%%%%%%%%%%%%%%%%%%%%%%%
log-likelihood :  -66.60846 
%%%%%%%%%%%%%%%%%%%%%%%%%%% iteration 3 %%%%%%%%%%%%%%%%%%%%%%%%%%%%
log-likelihood :  -60.61431 
%%%%%%%%%%%%%%%%%%%%%%%%%%% iteration 4 %%%%%%%%%%%%%%%%%%%%%%%%%%%%
log-likelihood :  -56.18606 
%%%%%%%%%%%%%%%%%%%%%%%%%%% iteration 5 %%%%%%%%%%%%%%%%%%%%%%%%%%%%
log-likelihood :  -52.06234 
%%%%%%%%%%%%%%%%%%%%%%%%%%% iteration 6 %%%%%%%%%%%%%%%%%%%%%%%%%%%%
log-likelihood :  -48.65078 
%%%%%%%%%%%%%%%%%%%%%%%%%%% iteration 7 %%%%%%%%%%%%%%%%%%%%%%%%%%%%
log-likelihood :  -46.05474 
%%%%%%%%%%%%%%%%%%%%%%%%%%% iteration 8 %%%%%%%%%%%%%%%%%%%%%%%%%%%%
log-likelihood :  -43.5476 
%%%%%%%%%%%%%%%%%%%%%%%%%%% iteration 9 %%%%%%%%%%%%%%%%%%%%%%%%%%%%
log-likelihood :  -40.99931 
%%%%%%%%%%%%%%%%%%%%%%%%%%% iteration 10 %%%%%%%%%%%%%%%%%%%%%%%%%%%%
log-likelihood :  -38.41393 
%%%%%%%%%%%%%%%%%%%%%%%%%%% iteration 11 %%%%%%%%%%%%%%%%%%%%%%%%%%%%
log-likelihood :  -35.80281 
%%%%%%%%%%%%%%%%%%%%%%%%%%% iteration 12 %%%%%%%%%%%%%%%%%%%%%%%%%%%%
log-likelihood :  -33.17556 
%%%%%%%%%%%%%%%%%%%%%%%%%%% iteration 13 %%%%%%%%%%%%%%%%%%%%%%%%%%%%
log-likelihood :  -30.53954 
%%%%%%%%%%%%%%%%%%%%%%%%%%% iteration 14 %%%%%%%%%%%%%%%%%%%%%%%%%%%%
log-likelihood :  -28.21947 
%%%%%%%%%%%%%%%%%%%%%%%%%%% iteration 15 %%%%%%%%%%%%%%%%%%%%%%%%%%%%
log-likelihood :  -26.23762 
%%%%%%%%%%%%%%%%%%%%%%%%%%% iteration 16 %%%%%%%%%%%%%%%%%%%%%%%%%%%%
log-likelihood :  -25.70075 
%%%%%%%%%%%%%%%%%%%%%%%%%%% iteration 17 %%%%%%%%%%%%%%%%%%%%%%%%%%%%
log-likelihood :  -25.69597 
%%%%%%%%%%%%%%%%%%%%%%%%%%% iteration 18 %%%%%%%%%%%%%%%%%%%%%%%%%%%%
log-likelihood :  -25.69248 
%%%%%%%%%%%%%%%%%%%%%%%%%%% iteration 19 %%%%%%%%%%%%%%%%%%%%%%%%%%%%
log-likelihood :  -25.68991 
%%%%%%%%%%%%%%%%%%%%%%%%%%% iteration 20 %%%%%%%%%%%%%%%%%%%%%%%%%%%%
log-likelihood :  -25.68802 
%%%%%%%%%%%%%%%%%%%%%%%%%%% iteration 21 %%%%%%%%%%%%%%%%%%%%%%%%%%%%
log-likelihood :  -25.68661 
%%%%%%%%%%%%%%%%%%%%%%%%%%% iteration 22 %%%%%%%%%%%%%%%%%%%%%%%%%%%%
log-likelihood :  -25.68555 
%%%%%%%%%%%%%%%%%%%%%%%%%%% iteration 23 %%%%%%%%%%%%%%%%%%%%%%%%%%%%
log-likelihood :  -25.68475 
> plot(1:3,res$bic,type="l",col="blue",xlab="K",ylab="BIC",main="model 
+     selection using BIC")
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>