CIBERlite {behaviorchange} | R Documentation |
CIBERlite
Description
CIBERlite plots can be used to quickly get an idea of means and correlations of a small number of determinants. They were developed to facilitate conducting and interpreting determinant studies by prevention professionals.
Usage
CIBERlite(
data,
determinants,
targets,
determinantOrder = NULL,
determinantLabels = NULL,
subDeterminantLabels = NULL,
title = NULL,
conf.level = 0.95,
scaleRange = NULL,
determinantAesthetics = list(fill = "black", color = NA, alpha = 0.5),
subDeterminantAesthetics = list(fill = "black", color = NA, alpha = 0.5),
rDiamondAesthetics = list(fill = "#c4c4c4", color = NA, alpha = 0.75)
)
Arguments
data |
The dataframe containing the variables. |
determinants |
Either a character vector with the names of the determinants, or a list of named character vectors, where each vector contains a number of subdeterminants, and each vector's name is the name of the more proximal determinant (i.e. that 'contains' those subdeterminants). |
targets |
A character vector with the names of the targets (i.e. more proximal determinants, behavior, etc). |
determinantOrder |
The order in which to display the determinants (if
this needs to be different from the order as provided in |
determinantLabels |
The labels to use for the determinants. |
subDeterminantLabels |
The labels to use for the subdeterminants. |
title |
The title of the plot. |
conf.level |
The confidence levels: a list with two named values; the
confidence level for the means, named |
scaleRange |
The full range of the scale of the determinants/subdeterminants; the minimum and maximum values are used if this is not provided. |
determinantAesthetics , subDeterminantAesthetics , rDiamondAesthetics |
The
aesthetics for the determinants, subdeterminants, and correlation diamonds,
each a list containing three named values: |
Details
More details will be provided in a forthcoming paper; until then, see https://CIBERlite.com
Value
A ggplot
.
Examples
### This example uses the determinant study Party Panel 15.1;
### see ?behaviorchange::BBC_data for more information.
data(BBC_pp15.1);
CIBERlite(data=BBC_pp15.1,
determinants=c('highDose_attitude',
'highDose_perceivedNorm',
'highDose_pbc'),
targets=c('highDose_intention'));