View source: R/calc_contrast_aggregated.R
calc_contrast_aggregated | R Documentation |
Calculate between contrast analysis from aggregated data (means, sds and ns)
calc_contrast_aggregated(means, sds, ns, between, lambda_between, data)
means |
numeric vector of mean values for every condition |
sds |
numeric vector of standard deviation values for every condition |
ns |
numeric vector of sample size values for every condition |
between |
factor for the independent variable that divides the data into independent groups |
lambda_between |
numeric vector for contrast weights. Names must match
the levels of |
data |
optional argument for the |
an object of type cofad_bw, including p-value, F-value, contrast weights, different effect sizes
Rosenthal, R., Rosnow, R.L., & Rubin, D.B. (2000). Contrasts and effect sizes in behavioral research: A correlational approach. New York: Cambridge University Press.
library(dplyr)
furr_agg <- furr_p4 %>%
group_by(major) %>%
summarize(mean = mean(empathy), sd = sd(empathy), n = n())
lambdas = c("psychology" = 1, "education" = -1, "business" = 0,
"chemistry" = 0)
calc_contrast_aggregated(mean, sd, n, major, lambdas, furr_agg)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.