Description Usage Arguments Examples
This function will compute the standard error of the mean given a raw
(trial-by-trial) dataset, a dependent variable of interest, an id variable
(e.g., "subjects" or "items"), and a set of grouping variables (e.g.,
"condition"). It also outputs several statistics: SD, N, and confidence
intervals.
Two versions of the function are provided. The standard
sem
function will accept dplyr
-like arguments (without quotes)
for column names. The other sem_
function works on quoted strings,
and all grouping variables must be supplied as a vector of characters to the
grouping
argument.
1 2 3 |
data |
A dataframe or datatable |
dv |
Variable representing your dependent variable. Use the bare variable name when using |
id |
Variable representing an id variable (e.g., "subject" or "item"). Use the bare variable name when using |
... |
Variables to group by (e.g., conditions) when using |
confint_sem |
Size (in standard errors) for confidence intervals. Default confidence intervals are 1 SEM To get 95% confidence intervals, enter 1.96. |
return_interim_data |
TRUE or FALSE, whether to return the interim dataset (e.g., subject-level data) as well as the grand mean dataset (via a list object). By default (FALSE), only the grand mean dataset is returned. |
grouping |
Character vector of the set of variables to group by (e.g.,
conditions) when using |
1 2 3 4 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.