ppratio {MSCMT} | R Documentation |
Post-pre-(r)mspe-ratios for placebo studies
Description
ppratio
calculates post-to-pre-(r)mspe-ratios for placebo studies.
Usage
ppratio(
x,
what,
range.pre,
range.post,
type = c("rmspe", "mspe"),
return.all = FALSE
)
Arguments
x |
An object of class |
what |
A character vector. Name of the variable to be considered. If missing, the (first) dependent variable will be used. |
range.pre |
A vector of length 2 defining the range of the pre-treatment period with start and end time given as
corresponding to the format of the respective column of the |
range.post |
A vector of length 2 defining the range of the post-treatment period with start and end time given as
corresponding to the format of the respective column of the |
type |
A character string. Either |
return.all |
A logical scalar. If |
Details
ppratio
calculates post-to-pre-(r)mspe-ratios for placebo studies based
on Synthetic Control Methods.
Value
If return.all
is FALSE
, a (named) vector of
post-pre-(r)mspe-ratios. If return.all
is TRUE
, a matrix with
three columns containing the pre-treatment (r)mspe, the post-treatment
(r)mspe, and the post-pre-ratio.