plotProfilesByCluster: Plot covariate profiles by cluster

Description Usage Arguments

Description

Plots the (discrete) covariate profiles, facetted vertically by cluster and (optionally) horizontally by some grouping (split) of the covariates. Covariate categories that are more common within a cluster than they are overall are shaded dark; those that are not are shaded light.

Usage

1
2
3
plotProfilesByCluster(riskProfObj, whichCovariates = NULL,
  rhoOrder = TRUE, useProfileStar = TRUE, covariate_info = list(title
  = "Covariate\ncategory", levels = NULL, labels = NULL, split = NULL))

Arguments

riskProfObj

Object of type riskProfObj, output of calcAvgRiskAndProfile.

whichCovariates

A vector of indices or a vector of strings corresponding to the covariates that are to be displayed.

rhoOrder

Should covariates be ordered in descending order of rho? If TRUE, the default, then indices given in whichCovariates will be interpreted as indices of the reordered covariates. Ignored silently if variable selection was not used.

useProfileStar

The definition of the star profile is given in Liverani, S., Hastie, D. I. and Richardson, S. (2013) PReMiuM: An R package for Bayesian profile regression. Ignored silently if variable selection was not used.

covariate_info

Optional list of details about the covariates, with (some of) the following named elements:

title:

String describing the covariate, default to "Covariate category".

levels:

Vector of integer values taken by the (discrete) covariates, specifying the order of the facets.

labels:

Vector of strings giving labels for each level of the covariate, in the same order as levels.

split:

A character vector specifying the covariate grouping for horizontal facetting. The first element appears in a subset of covariates to be plotted in a separate horizontal facet. The second and third elements, if present, are facet labels for covariates that do and do not meet this criterion, respectively, e.g. c("_citr", "Citrullinated", "Not citrullinated").


simisc/premiumPlots documentation built on Dec. 16, 2020, 1:35 p.m.