Learn R Programming

Mediana (version 1.0.8)

Statistic: Statistic object

Description

This function creates an object of class Statistic which can be added to an object of class AnalysisModel.

Usage

Statistic(id, method, samples, par = NULL)

Arguments

id

defines the ID of the statistic.

method

defines the type of statistics/method for computing the statistic.

samples

defines a list of sample(s) (defined in the data model) to be used by the statistic method.

par

defines the parameter(s) of the method for computing the statistic.

Details

Objects of class Statistic are used in objects of class AnalysisModel to define the statistics to produce. Several objects of class Statistic can be added to an object of class AnalysisModel.

method argument defines the statistical method. Several methods are already implemented in the Mediana package (listed below, along with the required parameters to define in the par parameter):

  • MedianStat: compute the median of the sample defined in the samples argument.

  • MeanStat: compute the mean of the sample defined in the samples argument.

  • SdStat: compute the standard deviation of the sample defined in the samples argument.

  • MinStat: compute the minimum of the sample defined in the samples argument.

  • MaxStat: compute the maximum of the sample defined in the samples argument.

  • DiffMeanStat: compute the difference of means between the two samples defined in the samples argument. Two samples must be defined.

  • EffectSizeContStat: compute the effect size for a continuous endpoint. Two samples must be defined.

  • RatioEffectSizeContStat: compute the ratio of two effect sizes for a continuous endpoint. Four samples must be defined.

  • PropStat: compute the proportion of the sample defined in the samples argument.

  • DiffPropStat: compute the difference of the proportions between the two samples defined in the samples argument. Two samples must be defined.

  • EffectSizePropStat: compute the effect size for a binary endpoint. Two samples must be defined.

  • RatioEffectSizePropStat: compute the ratio of two effect sizes for a binary endpoint. Four samples must be defined.

  • HazardRatioStat: compute the hazard ratio of the two samples defined in the samples argument. Two samples must be defined. By default the Log-Rank method is used. Optional argument: method taking as value Log-Rank or Cox.

  • EffectSizeEventStat: compute the effect size for a survival endpoint (log of the HR). Two samples must be defined. Two samples must be defined. By default the Log-Rank method is used. Optional argument: method taking as value Log-Rank or Cox.

  • RatioEffectSizeEventStat: compute the ratio of two effect sizes for a survival endpoint. Four samples must be defined. By default the Log-Rank method is used. Optional argument: method taking as value Log-Rank or Cox.

  • EventCountStat: compute the number of events observed in the sample(s) defined in the samples argument.

  • PatientCountStat: compute the number of patients observed in the sample(s) defined in the samples argument.

References

http://gpaux.github.io/Mediana/

See Also

See Also AnalysisModel.

Examples

Run this code
# NOT RUN {
# Analysis model
analysis.model = AnalysisModel() +
                 Test(id = "Placebo vs treatment",
                      samples = samples("Placebo", "Treatment"),
                      method = "TTest") +
                 Statistic(id = "Mean Treatment",
                           method = "MeanStat",
                           samples = samples("Treatment"))
# }

Run the code above in your browser using DataLab