calcDissimilarityMatrix: Calculates the dissimilarity matrix

Description Usage Arguments Value Authors References Examples

View source: R/postProcess.R

Description

Calculates the dissimilarity matrix.

Usage

1
calcDissimilarityMatrix(runInfoObj, onlyLS=FALSE)

Arguments

runInfoObj

Object of type runInfoObj.

onlyLS

Logical. It is set to FALSE by default. When it is equal to TRUE the dissimilarity matrix is not returned and the only method available to identify the optimal partition using 'calcOptimalClustering' is least squares. This parameter is to be used for datasets with many subjects, as C++ can compute the dissimilarity matrix but it cannot pass it to R for usage in the function 'calcOptimalClustering'. As guidance, be aware that a dataset with 85,000 subjects will require a RAM of about 26Gb, even if onlyLS=TRUE.

Value

Need to write this

disSimRunInfoObj

These are details regarding the run and in the same format as runInfoObj.

disSimMat

The dissimilarity matrix, in vector format. Note that it is diagonal, so this contains the upper triangle diagonal entries.

disSimMatPred

The dissimilarity matrix, again in vector format as above, for the predicted subjects.

lsOptSweep

The optimal partition among those explored by the MCMC, as defined by the least squares method. See Dahl (2006).

onlyLS

Logical. If it set to TRUE the only method available to identify the optimal partition using 'calcOptimalClustering' is least squares.

Authors

David Hastie, Department of Epidemiology and Biostatistics, Imperial College London, UK

Silvia Liverani, Department of Epidemiology and Biostatistics, Imperial College London and MRC Biostatistics Unit, Cambridge, UK

Maintainer: Silvia Liverani <[email protected]>

References

Liverani, S., Hastie, D. I., Azizi, L., Papathomas, M. and Richardson, S. (2014) PReMiuM: An R package for Profile Regression Mixture Models using Dirichlet Processes. Forthcoming in the Journal of Statistical Software. Available at http://uk.arxiv.org/abs/1303.2836

Examples

1
2
3
4
5
6
7
generateDataList <- clusSummaryBernoulliDiscrete()
inputs <- generateSampleDataFile(generateDataList)
runInfoObj<-profRegr(yModel=inputs$yModel, xModel=inputs$xModel, 
    nSweeps=10, nBurn=20, data=inputs$inputData, output="output", 
    covNames=inputs$covNames,nClusInit=15)

dissimObj<-calcDissimilarityMatrix(runInfoObj)

PReMiuM documentation built on Sept. 26, 2018, 5:04 p.m.