pt_summary | R Documentation |
This function provides basic summary descriptives of the purchase task indicators of the entire sample or by a grouping variable. See details for full list of summary statistics provided.
pt_summary(pt, pt_vars, group_var = NULL)
pt |
A data frame consisting of the purchase variables 'pt_vars' to summarize. |
pt_vars |
The purchase task variables to summarize. |
group_var |
An optional grouping variable to summarize the purchase task variables by. |
This function will return the following descriptives: The number of individuals with a non-missing value ('Ntot'), as well as the number of individuals with a missing value ('Nmiss'); The mean average ('Mean') and mean standard error ('SE'); as well as the minimum ('Min') and maximum ('Max') values of the variable(s).
An object of type data frame
### --- Example Data
pt <- data.frame("ID" = c(1:36),
"Intensity" = c(10,12,15,0,99,11,7,6,12,7,8,10,5,6,10,0,3,
7,5,0,2,3,5,6,10,15,12,7,0,9,0,6,7,8,4,5),
"Breakpoint" = c(1,2,5,0,10,3,0.5,0.2,0.3,3,4,5,7.5,0.5,2,0,0.1,
0.5,0.5,0,3,2,2,1,2,3,4,1,0,2,0,5,5,7.5,2,3))
### --- Function Example
pt_summary(pt, pt_vars = c("Intensity","Breakpoint"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.