Description Usage Arguments Details Value Methods (by class) References Examples
Test on deviceevents using Wald's Sequential Probability Ratio Test (SPRT). Supports both Poisson (default) and normal distribution functions.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20  sprt(df, ...)
## S3 method for class 'mds_ts'
sprt(df, ts_event = c(Count = "nA"), analysis_of = NA, ...)
## Default S3 method:
sprt(
df,
analysis_of = NA,
eval_period = NULL,
obs_period = 1,
h0 = NULL,
h1 = NULL,
relative_risk = NULL,
distribution = "poisson",
alpha = 0.05,
beta = 0.2,
h1_type = "greater",
...
)

df 
Required input data frame of class

... 
Further arguments passed onto 
ts_event 
Required if Default: 
analysis_of 
Optional string indicating the English description of what
was analyzed. If specified, this will override the name of the
Default: Example: 
eval_period 
Optional positive integer indicating the number of unique
times counting in reverse chronological order to evaluate. This will be used
to establish the default null hypothesis Default: 
obs_period 
Required positive integer indicating the number of unique times
in reverse chronological order to observe and test against the null
hypothesis Default: Example: 
h0 
Optional numeric value representing the null hypothesis. See details for more. Default: 
h1 
Optional numeric value representing the test/alternative
hypothesis. Either Default: 
relative_risk 
Optional numeric value representing the relative risk used to
infer the test/alternative hypothesis as follows: Default: Example: 
distribution 
Required distribution to estimate. Must be either
Default: 
alpha 
Required Type I error probability between 0 and 1. Default: 
beta 
Required Type II error probability between 0 and 1. Default: 
h1_type 
Required type of alternative hypothesis. Must be any of three
values: Default: 
Runs Wald's SPRT where the null hypothesis h0
and alternative
hypothesis h1
represent event occurrence in a single time period.
Event occurrence in Wald's context is the number of events in a time period.
However, at the user's discretion, this function allows event occurrence to
be any continuous number (such as event rate).
In typical medical device surveillance, h1
is greater than h0
or relative_risk
is greater than 1, and h1_type="greater"
. This is
because we wish to detect elevated occurrences of an undesirable event.
For parameter ts_event
, in the uncommon case where the
deviceevent count (Cell A) variable is not "nA"
, the name of the
variable may be specified here. A named character
vector may be used where the name is the English description of what was
analyzed. Note that if the parameter analysis_of
is specified, it will
override this name. Example: ts_event=c("Count of Bone Cement
Leakages"="event_count")
A named list of class mdsstat_test
object, as follows:
Name of the test run
English description of what was analyzed
Named boolean of whether the test was run. The name contains the run status.
A standardized list of test run results: statistic
for the test statistic, lcl
and ucl
for the set
confidence bounds, p
for the pvalue, signal
status, and
signal_threshold
.
The test parameters
The data on which the test was run
mds_ts
: SPRT on mds_ts data
default
: SPRT on general data
Wald, Abraham (June 1945). "Sequential Tests of Statistical Hypotheses". Annals of Mathematical Statistics. 16 (2): 117186.
Martin Kulldorff, Robert L. Davis, Margarette Kolczak, Edwin Lewis, Tracy Lieu & Richard Platt (2011) A Maximized Sequential Probability Ratio Test for Drug and Vaccine Safety Surveillance, Sequential Analysis, 30:1, 5878.
Stephane Mikael Bottine (2015). SPRT: Wald's Sequential Probability Ratio Test. R package version 1.0. https://CRAN.Rproject.org/package=SPRT
1 2 3 4 5 6 7 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.