Description Usage Arguments Details Value Examples
View source: R/createresponse.R
generate a response variable, given ranks and effect size
1 | createresponse(ranks, Nmulti, effectsize, error)
|
ranks |
a named vector with the ranks (and individual IDs as name); typically the output from |
Nmulti |
integer, the number of observations to create per individual |
effectsize |
numeric, the effect size |
error |
numeric, the error |
the function calculates a response variable with the following formula:
resp = effectsize
* ranks
+ rnorm(..., mean = 0, sd = error)
in addition, a random intercept is generated:
random intercept = rnorm(length(ranks))
a data.frame
with length(ranks)
* Nmulti
rows
1 2 3 4 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.