ADcens
, chisqcens
, CvMcens
, gofcens
and KScens
objects.methods_tests.Rd
Print, summary and print summary methods for ADcens
, chisqcens
,
CvMcens
, gofcens
and KScens
objects.
# S3 method for class 'ADcens'
print(x, ...)
# S3 method for class 'ADcens'
summary(object, outp = c("list", "table"),
print.AIC = TRUE, print.BIC = TRUE,
print.infoBoot = FALSE, ...)
# S3 method for class 'ADcens'
print.summary(x, degs = 3, ...)
# S3 method for class 'chisqcens'
print(x, ...)
# S3 method for class 'chisqcens'
summary(object, outp = c("list", "table"),
print.AIC = TRUE, print.BIC = TRUE,
print.infoBoot = FALSE, ...)
# S3 method for class 'chisqcens'
print.summary(x, degs = 3, ...)
# S3 method for class 'CvMcens'
print(x, ...)
# S3 method for class 'CvMcens'
summary(object, outp = c("list", "table"),
print.AIC = TRUE, print.BIC = TRUE,
print.infoBoot = FALSE, ...)
# S3 method for class 'CvMcens'
print.summary(x, degs = 3, ...)
# S3 method for class 'gofcens'
print(x, ...)
# S3 method for class 'gofcens'
summary(object, outp = c("list", "table"),
print.AIC = TRUE, print.BIC = TRUE,
print.infoBoot = FALSE, ...)
# S3 method for class 'gofcens'
print.summary(x, degs = 3, ...)
# S3 method for class 'KScens'
print(x, ...)
# S3 method for class 'KScens'
summary(object, outp = c("list", "table"),
print.AIC = TRUE, print.BIC = TRUE,
print.infoBoot = FALSE, ...)
# S3 method for class 'KScens'
print.summary(x, degs = 3, ...)
An object of class ADcens
chisqcens
,
CvMcens
, gofcens
or KScens
.
Indicator of how the output will be displayed. The possible formats are list
and table
.
Logical to indicate if the AIC of the model should be printed. Default is TRUE
Logical to indicate if the BIC of the model should be printed. Default is TRUE
Logical to indicate if the number of bootstrap samples used should be printed. Default is FALSE
Integer indicating the number of decimal places of the numeric results of the output. By default is 3.
Optional arguments.
print()
Basic information is returned on the screen.
summary()
A list with the elements:
Distribution
: Null distribution.
Hypothesis
: Parameters under the null hypothesis (if params0
is provided).
Test
: Vector containing the value of the Anderson-Darling statistic (AD
) and the
estimated p-value (p-value
).
Estimates
: Vector with the maximum likelihood estimates of the parameters
of the distribution under study.
StdErrors
: Vector containing the estimated standard errors.
aic
: The Akaike information criterion.
bic
: The so-called BIC or SBC (Schwarz Bayesian criterion).
BS
: The number of bootstrap samples used.
print.summary()
x
, with the invisible flag set to prevent printing.
# Generating data
set.seed(123)
survt <- round(rlnorm(300, 2, 1), 2)
censt <- round(rexp(300, 1 / 20), 2)
times <- pmin(survt, censt)
cens <- as.numeric(survt <= censt)
# Print method
set.seed(123)
CvMcens(times, cens, distr = "weibull", BS = 99)
#> Null hypothesis: the data follows a weibull distribution
#>
#> CvM Test results:
#> CvM p-value
#> 0.376 0.010
#>
# List output from summary method
set.seed(123)
summary(ADcens(times = rweibull(100, 12, scale = 4), distr = "weibull",
BS = 149))
#> Distribution: weibull
#>
#> AD Test results:
#> AD p-value
#> 0.176 0.953
#>
#> Parameter estimates (se):
#> shape scale
#> 12.241 (0.938) 4 (0.034)
#>
#> AIC: 84.375
#> BIC: 89.585
#>
# Table output from summary method
set.seed(123)
summary(ADcens(times = rweibull(100, 12, scale = 4), distr = "weibull",
BS = 99), outp = "table")
#> Distribution: weibull
#>
#> AD Test results:
#> ------- | -------
#> Metric | Value
#> ------- | -------
#> AD | 0.176
#> p-value | 0.97
#> ------- | -------
#>
#> Parameter estimates:
#> --------- | --------- | ---------
#> Parameter | Value | s.e.
#> --------- | --------- | ---------
#> shape | 12.241 | 0.938
#> scale | 4 | 0.034
#> --------- | --------- | ---------
#>
#> AIC: 84.375
#> BIC: 89.585
#>