Skip to contents

[Experimental]

A show method that displays essential information of objects.

Usage

# S4 method for class 'SampleSize'
show(object)

# S4 method for class 'MCTab'
show(object)

# S4 method for class 'BAsummary'
show(object)

# S4 method for class 'RefInt'
show(object)

# S4 method for class 'tpROC'
show(object)

# S4 method for class 'Desc'
show(object)

Arguments

object

(any)
input.

Value

None (invisible NULL), only used for the side effect of printing to the console.

Examples

# Sample zie calculation
size_one_prop(p1 = 0.95, p0 = 0.9, alpha = 0.05, power = 0.8)
#> 
#>  Sample size determination for one Proportion 
#> 
#>  Call: size_one_prop(p1 = 0.95, p0 = 0.9, alpha = 0.05, power = 0.8)
#> 
#>    optimal sample size: n = 239 
#> 
#>    p1:0.95 p0:0.9 alpha:0.05 power:0.8 alternative:two.sided
size_ci_corr(r = 0.9, lr = 0.85, alpha = 0.025, alternative = "greater")
#> 
#>  Sample size determination for a Given Lower Confidence Interval of Pearson's Correlation 
#> 
#>  Call: size_ci_corr(r = 0.9, lr = 0.85, alpha = 0.025, alternative = "greater")
#> 
#>    optimal sample size: n = 86 
#> 
#>    r:0.9 lr:0.85 alpha:0.025 interval:c(10, 1e+05) tol:1e-05 alternative:greater

# Get 2x2 Contingency Table
qualData %>% diagTab(formula = ~ CandidateN + ComparativeN)
#> Contingency Table: 
#> 
#> levels: 0 1
#>           ComparativeN
#> CandidateN   0   1
#>          0  54  16
#>          1   8 122

# Bland-Altman analysis
data("platelet")
blandAltman(x = platelet$Comparative, y = platelet$Candidate)
#>  Call: blandAltman(x = platelet$Comparative, y = platelet$Candidate)
#> 
#>   Absolute difference type:  Y-X
#>   Relative difference type:  (Y-X)/(0.5*(X+Y))
#> 
#>                             Absolute.difference Relative.difference
#> N                                           120                 120
#> Mean (SD)                        7.330 (15.990)      0.064 ( 0.145)
#> Median                                    6.350               0.055
#> Q1, Q3                         ( 0.150, 15.750)    ( 0.001,  0.118)
#> Min, Max                      (-47.800, 42.100)    (-0.412,  0.667)
#> Limit of Agreement            (-24.011, 38.671)    (-0.220,  0.347)
#> Confidence Interval of Mean    ( 4.469, 10.191)    ( 0.038,  0.089)

# Reference Interval
data("calcium")
refInterval(x = calcium$Value, RI_method = "nonparametric", CI_method = "nonparametric")
#> 
#>  Reference Interval Method: nonparametric, Confidence Interval Method: nonparametric 
#> 
#>  Call: refInterval(x = calcium$Value, RI_method = "nonparametric", CI_method = "nonparametric")
#> 
#>   N = 240
#>   Outliers: NULL
#>   Reference Interval: 9.10, 10.30
#>   RefLower Confidence Interval: 8.9000, 9.2000
#>   Refupper Confidence Interval: 10.3000, 10.4000

# Comparing the Paired ROC when Non-inferiority margin <= -0.1
data("ldlroc")
aucTest(
  x = ldlroc$LDL, y = ldlroc$OxLDL, response = ldlroc$Diagnosis,
  method = "non-inferiority", h0 = -0.1
)
#> Setting levels: control = 0, case = 1
#> Setting direction: controls < cases
#> 
#> The hypothesis for testing non-inferiority based on Paired ROC curve
#> 
#>  Test assay:
#>   Area under the curve: 0.7995
#>   Standard Error(SE): 0.0620
#>   95% Confidence Interval(CI): 0.6781-0.9210 (DeLong)
#> 
#>  Reference/standard assay:
#>   Area under the curve: 0.5617
#>   Standard Error(SE): 0.0836
#>   95% Confidence Interval(CI): 0.3979-0.7255 (DeLong)
#> 
#>  Comparison of Paired AUC:
#>   Alternative hypothesis: the difference in AUC is non-inferiority to -0.1
#>   Difference of AUC: 0.2378
#>   Standard Error(SE): 0.0790
#>   95% Confidence Interval(CI): 0.0829-0.3927 (standardized differenec method)
#>   Z: 4.2739
#>   Pvalue: 9.606e-06
data(adsl_sub)

# Count multiple variables by treatment
adsl_sub %>%
  descfreq(
    var = c("AGEGR1", "SEX", "RACE"),
    bygroup = "TRTP",
    format = "xx (xx.x%)",
    addtot = TRUE,
    na_str = "0"
  )
#> Error in as.list.default(X): no method for coercing this S4 class to a vector

# Summarize multiple variables by treatment
adsl_sub %>%
  descvar(
    var = c("AGE", "BMIBL", "HEIGHTBL"),
    bygroup = "TRTP",
    stats = c("N", "MEANSD", "MEDIAN", "RANGE", "IQR"),
    autodecimal = TRUE,
    addtot = TRUE
  )
#> Error in as.list.default(X): no method for coercing this S4 class to a vector