gammaEffectSizeLong | R Documentation |
Function for calculating non-parametric effect size for any specified quantile(s) as proposed by Akinshin.
gammaEffectSizeLong(
data_table,
variable,
year_1,
year_2,
quantiles=1:9/10,
digits=3)
data_table |
Longitudinal dataset (e.g., from the SGP package) from which to calculate effect sizes over specified years. |
variable |
Character (length 1) identifying the variable of interest (e.g., ‘SCALE_SCORE’). |
year_1 |
Character identifying the comparison/control year(s). Can be multiple years. Variable assumed to be named ‘YEAR’. |
year_2 |
Character identifying the year(s) of interest (treatment). Can be multiple years. Variable assumed to be named ‘YEAR’. |
quantiles |
Argument to specify quantile(s) to evaluate (between 0 and 1). Default is Deciles. |
digits |
Number of digits to round results to. |
Typical use of the function is to submit scale score or SGP data from
which to calculate effect sizes (standardized differences in the two distributions
at the given quantiles). This function applies the lower level function Andrey Akinshin
proposed in a June 25, 2020 blog post - https://aakinshin.net/posts/nonparametric-effect-size/
to longitudinal data typically produced from SGP analyses. Usually done within
a data.table
Function returns an effect size (numeric) vector of length quantiles
that is easily combined into a table using data.table.
See example below.
Damian W. Betebenner dbetebenner@nciea.org and Adam Van Iwaarden avaniwaarden@nciea.org
## Not run:
### require(SGPdata)
### require(data.table)
sgpData_LONG_COVID[,
as.list(gammaEffectSizeLong(.SD, "SCALE_SCORE", "2019", "2021")),
keyby=c("CONTENT_AREA", "GRADE")]
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.