Description Usage Arguments Value Examples
A wrapper that takes a scenario, and produces the Significance Of iNdicator Exclusion (SONE) values for each exclusion and calculates efficacy. Used by optimal_p
.
1 | scenario_sim(sizes, n_sim, to_n, tn_n = 8 - to_n, ...)
|
sizes |
An array of sample sizes to be simulated. Can be single value. |
n_sim |
number of simulations. 1000 is a start, 10000 was used in paper, but takes a long time |
to_n |
Number of indicators in a Trait relating to Outcome |
tn_n |
Number of indicators in a Trait Not relating to outcome. |
... |
further tweaking of the scale simulator, see |
Returns a list of SONE values and related efficacy. See example for details
SONE results. Feed this to scenario_plot
or scenario_plot80
(see examples)
Summary efficacy. Such data comprises Table 1 in Vainik, Mottus et al., 2015 EJP
Full efficacy data.
1 2 3 4 5 6 7 8 9 10 11 | #A scenario with 8 items relating to outcome, testing 2 different samples
sizes=c(250,500)
n_sim=100
to_n=8
scen1=scenario_sim(sizes,n_sim,to_n) # takes a few seconds..
scenario_plot80(scen1[[1]],sizes,n_sim)
# A scenario with 2 out of 8 items relating to outcome, 2 different samples
to_n=2
scen2=scenario_sim(sizes,n_sim,to_n) # takes a few seconds..
scenario_plot(scen2[[1]],sizes,n_sim,to_n)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.