LCT: Estimate a Latent Class Tree model

Description Usage Arguments Details Value

Description

Estimate a Latent Class Tree model with Latent GOLD 5.1

Usage

1
2
3
4
5
LCT(Dataset, LG, LGS = NULL, itemNames = NULL, mLevels = NULL,
  weight = "weight", resultsName = "", maxClassSplit1 = 2,
  maxClassSplit2 = 2, decreasing = TRUE, stopCriterium = "BIC",
  minSampleSize = 5, nKeepVariables = 0, namesKeepVariables = NULL,
  sets = 16, iterations = 50)

Arguments

Dataset

A dataframe with the data or the filepath of the data.

LG

Filepath of the Latent GOLD executable

LGS

Filepath of Latent GOLD syntax for a model with 1- and 2-class splits

itemNames

The names of the indicators. If this is not given, all column names of the datafile will be used.

mLevels

A character vector being either "ordinal" or "continuous" to indicate the measurement level of each variable. It is required when LGS is specified.

weight

Name of the variable with the weights. When all records are unique observations, this should be one for every observation.

resultsName

Name of a folder which will be created in the working directory and contains all results by Latent GOLD.

maxClassSplit1

Maximum size of the first split of the tree. Will be assessed with the criterion given in stopCriterium. Defaults to two.

maxClassSplit2

Maximum size of each split after the first split of the tree. Defaults to two.

decreasing

Whether the ordering of classes should be decreasing or not. Defaults to TRUE.

stopCriterium

Criterium to decide on a split. Can be "LL" (logLikelihood), "AIC" or "BIC".

minSampleSize

Minimum sample size of a class. If this is below 1, a probability of the total sample size is used.

nKeepVariables

Number of variables to be kept if one wants to explore the results with external variables.

namesKeepVariables

Number of variables to be kept if one wants to explore the results with external variables.

sets

Name of the variable with the weights. When all records are unique observations, this should be one for every observation.

iterations

A character vector being either ordinal or continuous to indicate the measurement level of each variable. It is required when LGS is specified.

Details

The LCT function constructs a LCT model by sequentially estimating 2-class models with Latent GOLD 5.1. This can be done automatically for standard models, but for more complex models a customized Latent GOLD syntax can be provided. The model size of the root can be increased with maxClassSplit1 and the remaining splits with maxClassSplit2.

Value

Results of a Latent Class Tree analysis in an object of class 'LCT', which is a named list with two named lists. The first list contains information on the setup of the tree and the second list contains information on every split.


MattisvdBergh/LCT documentation built on May 8, 2019, 9:50 a.m.