Description Usage Arguments Details References See Also Examples
This function creates an object of class Test
which can be added to an object of class AnalysisModel
.
1 
id 
defines the ID of the Test object. 
method 
defines the method of the Test object. 
samples 
defines a list of samples defined in the data model to be used within the selected Test object method. 
par 
defines the parameter(s) of the selected Test object method. 
Objects of class Test
are used in objects of class AnalysisModel
to define the statistical test to produce. Several objects of class Test
can be added to an object of class AnalysisModel
.
method
argument defines the statistical test method. Several methods are already implemented in the Mediana package (listed below, along with the required parameters to define in the par
parameter):
TTest
: perform a twosample ttest between the two samples defined in the samples
argument. Optional parameter: larger
(Larger value is expected in the second sample (TRUE
or FALSE
)). Two samples must be defined.
TTestNI
: perform a noninferiority twosample ttest between the two samples defined in the samples
argument. Required parameter: margin
. Optional parameter: larger
(Larger value is expected in the second sample (TRUE
or FALSE
)).Two samples must be defined.
WilcoxTest
: perform a WilcoxonMannWhitney test between the two samples defined in the samples
argument. Optional parameter: larger
(Larger value is expected in the second sample (TRUE
or FALSE
)).Two samples must be defined.
PropTest
: perform a twosample test for proportions between the two samples defined in the samples
argument. Optional parameter: yates
(Yates' continuity correction TRUE
or FALSE
) and larger
(Larger value is expected in the second sample (TRUE
or FALSE
)). Two samples must be defined.
PropTestNI
: perform a noninferiority twosample test for proportions between the two samples defined in the samples
argument. Required parameter: margin
. Optional parameter: yates
(Yates' continuity correction TRUE
or FALSE
) and larger
(Larger value is expected in the second sample (TRUE
or FALSE
)). Two samples must be defined.
FisherTest
: perform a Fisher exact test between the two samples defined in the samples
argument. Optional parameter: larger
(Larger value is expected in the second sample (TRUE
or FALSE
)). Two samples must be defined.
GLMPoissonTest
: perform a Poisson regression test between the two samples defined in the samples
argument. Optional parameter: larger
(Larger value is expected in the second sample (TRUE
or FALSE
)). Two samples must be defined.
GLMNegBinomTest
: perform a Negativebinomial regression test between the two samples defined in the samples
argument. Optional parameter: larger
(Larger value is expected in the second sample (TRUE
or FALSE
)).Two samples must be defined.
LogrankTest
: perform a Logrank test between the two samples defined in the samples
argument. Optional parameter: larger
(Larger value is expected in the second sample (TRUE
or FALSE
)). Two samples must be defined.
OrdinalLogisticRegTest
: perform an Ordinal logistic regression test between the two samples defined in the samples
argument. Optional parameter: larger
(Larger value is expected in the second sample (TRUE
or FALSE
)). Two samples must be defined.
It is to be noted that the statistical tests implemented are onesided and thus the sample order in the samples argument is important. In particular, the Mediana package assumes by default that a numerically larger value of the endpoint is expected in Sample 2 compared to Sample 1. Suppose, for example, that a higher treatment response indicates a beneficial effect (e.g., higher improvement rate). In this case Sample 1 should include control patients whereas Sample 2 should include patients allocated to the experimental treatment arm. The sample order needs to be reversed if a beneficial treatment effect is associated with a lower value of the endpoint (e.g., lower blood pressure), or alternatively (from version 1.0.6), the optional parameters larger
must be set to FALSE
to indicate that a larger value is expected on the first Sample.
http://gpaux.github.io/Mediana/
See Also AnalysisModel
.
1 2 3 4 5  # Analysis model
analysis.model = AnalysisModel() +
Test(id = "Placebo vs treatment",
samples = samples("Placebo", "Treatment"),
method = "TTest")

Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.