This function computes the Numbers Needed for Change, and shows a visualisation to illustrate them.
nnc(d = NULL, cer = NULL, r = 1,
threshold = NULL, mean = 0, sd = 1,
eventDesirable = TRUE, eventIfHigher = TRUE,
d.ci = NULL, cer.ci = NULL, r.ci = NULL,
d.n = NULL, cer.n = NULL, r.n = NULL,
plot = TRUE, returnPlot = TRUE, silent = FALSE)
The value of Cohen's d.
The Control Event Rate.
The correlation between the determinant and behavior (for mediated Numbers Needed for Change).
If the event rate is not available, a threshold value can be specified
instead, which is then used in conjunction with the mean
(mean
) and standard deviation (sd
) and assuming
a normal distribution to compute the event rate.
The mean value, used to draw the plot, or, if no CER is provided but instead the threshold value, to compute the CER.
The standard deviation, used to draw the plot (and to compute the CER if a threshold value is supplied instead of the CER).
Whether an event is desirable or undesirable.
Whether scores above or below the threshold are considered 'an event'.
Instead of providing a point estimate for Cohen's d, a confidence interval can be provided.
Instead of providing a point estimate for the Control Event Rate, a confidence interval can be provided.
Instead of providing a point estimate for the correlation, a confidence interval can be provided.
In addition to providing a point estimate for Cohen's d, a sample size can be provided; if it is, the confidence interval is computed.
In addition to providing a point estimate for the Control Event Rate, a sample size can be provided; if it is, the confidence interval is computed.
In addition to providing a point estimate for the correlation, a sample size can be provided; if it is, the confidence interval is computed.
Whether to generate and show the plot.
Whether to return the plot (as an attribute), or to only display it.
Whether to suppress notifications.
The Numbers Needed for Change (NNC), potentially with a plot visualising the NNC in an attribute.
This function computes the Numbers Needed for Change. See Gruijters & Peters (2017) for details.
Gruijters, S. L. K., & Peters, G.-J. Y. (2017). Introducing the Numbers Needed for Change (NNC): A practical measure of effect size for intervention research.
# NOT RUN {
### Simple example
nnc(d=.4, cer=.3);
### Or for a scenario where events are undesirable, and the
### intervention effective (therefore having a negative value for d):
nnc(d=-.4, cer=.3, eventDesirable=FALSE);
# }
Run the code above in your browser using DataLab