View source: R/generate_data.R
generate_data | R Documentation |
bouldr
Description: Generates a data frame of the correct format to be used
with bouldr
.
generate_data(
obs.per,
Diagnosis = c("Depression", "Anxiety"),
Measure = c("A", "B", "C", "D", "E"),
Informant = c("Parent", "Teacher", "Self")
)
obs.per |
Number of observations per cell. Total N would be this number times the number of options in the other three variables. |
Diagnosis |
A character vector of names for this grouping variable |
Measure |
A character vector of names for this grouping variable |
Informant |
A character vector of names for this grouping variable |
By default, the output data frame frame contains the following variables:
ID: participant ID
Diagnosis: the type of diagnosis. One or more – default 2: "Depression" and "Anxiety"
Measure: the form used to measure symptoms. One or more – default 5: (A through E)
Informant: the person taking the form. One or more – default 3: "Parent", "Teacher" and "Self"
Outcome: whether the diagnosis is present. Must be dichotomous – default: "yes" and "no"
Score: the score on the measure. A (continuous) numeric variable.
Note that these variable names are arbitrary; they have been chosen here to reflect common use-cases.
A data frame that can be used in bouldr
generate_data(10)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.