Learn R Programming

PReMiuM (version 3.0.24)

calcDissimilarityMatrix: Calculates the dissimilarity matrix

Description

Calculates the dissimilarity matrix.

Usage

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 data

Value

  • Need to write this
  • disSimRunInfoObjThese are details regarding the run and in the same format as runInfoObj.
  • disSimMatThe dissimilarity matrix, in vector format. Note that it is diagonal, so this contains the upper triangle diagonal entries.
  • disSimMatPredThe dissimilarity matrix, again in vector format as above, for the predicted subjects.
  • lsOptSweepThe optimal partition among those explored by the MCMC, as defined by the least squares method. See Dahl (2006).
  • onlyLSLogical. 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

References

Liverani, S., Hastie, D. I., Azizi, L., Papathomas, M. and Richardson, S. (2013) PReMiuM: An R package for Profile Regression Mixture Models using Dirichlet Processes. Submitted. Available at http://uk.arxiv.org/abs/1303.2836

Examples

Run this code
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)

Run the code above in your browser using DataLab