| Title: | Alpha-Power Hazard Regression Models for Survival Data |
|---|---|
| Description: | Implements the alpha-power hazard model and regression frameworks for survival data based on the flexible hazard rate function h(x; alpha, beta) = alpha^x + x^(beta-1) (Pal et al., 2026 <doi:10.1007/s41096-026-00297-5>). Provides standard distribution functions (d, p, q, r, h, H, s) and distributional properties including raw/central moments, variance, skewness, kurtosis, quantile statistics (Bowley's skewness, Moors's kurtosis), Lambert W hazard rate function minimum (Corless et al., 1996), order statistics, and stochastic ordering (Shaked & Shanthikumar, 1994). Computes five classical estimation methods for baseline parameters: Maximum Likelihood Estimation (Casella & Berger, 2002), Least Squares Estimation (Swain et al., 1988), Weighted Least Squares Estimation (Styan, 1973), Maximum Product of Spacings Estimation (Cheng & Amin, 1983 <doi:10.1111/j.2517-6161.1983.tb01241.x>), and Cramer-von Mises Estimation (Macdonald, 1971). Supports four hazard regression models (M1-M4) within proportional hazards and parametric frameworks across uncensored data, right censoring, left censoring, interval censoring, and progressive Type-I and Type-II censoring schemes (Lee & Wang, 2003; Lawless, 2011; Balakrishnan & Aggarwala, 2000). Includes comprehensive model diagnostics, Cox-Snell, martingale, deviance, standardized, and studentized residuals, leverage, Cook's distance, DFFITS, DFBETAS, model comparisons (AIC, BIC, WAIC), k-fold cross-validation, prediction suites, random data generators, and an eight-panel diagnostic visualization suite. |
| Authors: | Shikhar Tyagi [aut, cre] (ORCID: <https://orcid.org/0000-0003-1606-0844>), Arvind Pandey [aut], Bhupendra Singh [aut], Vrijesh Tripathi [aut] |
| Maintainer: | Shikhar Tyagi <[email protected]> |
| License: | GPL-3 |
| Version: | 0.1.0 |
| Built: | 2026-09-28 07:34:50 UTC |
| Source: | https://github.com/cran/AlphaPowerHazard |
Probability density function (PDF), cumulative distribution function (CDF), quantile function, random variates generation, hazard function, cumulative hazard function, survival function, raw and central moments, quantile statistics (Bowley's skewness and Moors's kurtosis), hazard rate minimum location, order statistics, and stochastic ordering for the Alpha-Power Hazard distribution.
halpha_power(x, alpha, beta) Halpha_power(x, alpha, beta) salpha_power(x, alpha, beta) dalpha_power(x, alpha, beta, log = FALSE) palpha_power(q, alpha, beta, lower.tail = TRUE, log.p = FALSE) qalpha_power(p, alpha, beta, lower.tail = TRUE, log.p = FALSE) ralpha_power(n, alpha, beta) r_alpha_power(n, alpha, beta)halpha_power(x, alpha, beta) Halpha_power(x, alpha, beta) salpha_power(x, alpha, beta) dalpha_power(x, alpha, beta, log = FALSE) palpha_power(q, alpha, beta, lower.tail = TRUE, log.p = FALSE) qalpha_power(p, alpha, beta, lower.tail = TRUE, log.p = FALSE) ralpha_power(n, alpha, beta) r_alpha_power(n, alpha, beta)
x, q
|
numeric vector of quantiles or values. |
alpha |
positive numeric (> 1); alpha shape parameter. |
beta |
positive numeric (> 0); beta shape parameter. |
log, log.p
|
logical; if |
lower.tail |
logical; if |
p |
numeric vector of probabilities. |
n |
integer; number of random variates to generate. |
The baseline hazard rate function is given by:
The cumulative hazard function is:
The survival function is:
The probability density function is:
dalpha_power returns density values.
palpha_power returns cumulative probabilities.
qalpha_power returns quantiles.
ralpha_power and r_alpha_power return random variates.
halpha_power returns hazard values.
Halpha_power returns cumulative hazard values.
salpha_power returns survival probabilities.
Pal, S., Tyagi, V., Chesneau, C., & Sharma, V. K. (2026). A New Flexible Hazard Regression Model for Survival Data Analysis Alternative to Cox and AFT Regression Models. Journal of the Indian Society for Probability and Statistics. doi:10.1007/s41096-026-00297-5
dalpha_power(c(0.5, 1, 1.5), alpha = 1.5, beta = 0.8) palpha_power(c(0.5, 1, 1.5), alpha = 1.5, beta = 0.8) qalpha_power(c(0.25, 0.5, 0.75), alpha = 1.5, beta = 0.8) set.seed(123) ralpha_power(5, alpha = 1.5, beta = 0.8)dalpha_power(c(0.5, 1, 1.5), alpha = 1.5, beta = 0.8) palpha_power(c(0.5, 1, 1.5), alpha = 1.5, beta = 0.8) qalpha_power(c(0.25, 0.5, 0.75), alpha = 1.5, beta = 0.8) set.seed(123) ralpha_power(5, alpha = 1.5, beta = 0.8)
Computes the survival function , density
, hazard , and cumulative hazard
for regression models M1, M2, M3, and M4 with optional gamma frailty.
alpha_power_functions( t, eta = rep(0, length(t)), theta_frailty = NULL, par = c(1.5, 1.1), model = "M1" )alpha_power_functions( t, eta = rep(0, length(t)), theta_frailty = NULL, par = c(1.5, 1.1), model = "M1" )
t |
positive numeric vector of time points. |
eta |
numeric vector of linear predictors |
theta_frailty |
positive numeric; frailty variance parameter (if |
par |
numeric vector of baseline parameters |
model |
character; one of |
A list with components S, f, h, H.
A formula-based interface to fit_alpha_power,
modelled after lm and glm.
The response must be a Surv object.
alpha_power_hazard( formula, data, model = c("M1", "M2", "M3", "M4"), frailty = FALSE, time2 = NULL, prog_cen = NULL, init = NULL )alpha_power_hazard( formula, data, model = c("M1", "M2", "M3", "M4"), frailty = FALSE, time2 = NULL, prog_cen = NULL, init = NULL )
formula |
a |
data |
a data frame containing the variables in the formula. |
model |
character; one of |
frailty |
logical; whether to include frailty. Default is |
time2 |
numeric vector; upper bound for interval-censored observations. |
prog_cen |
integer vector; progressive censoring scheme. |
init |
numeric vector; initial parameter values. |
An object of class c("alpha_power", "alpha_power_fit")
with an additional call and formula component.
set.seed(1) dat <- data.frame( time = c(1.2, 0.8, 2.3, 1.5, 3.1), status = c(1, 1, 0, 1, 0), X1 = c(0.5, -0.2, 0.8, 0.1, -0.5) ) fit <- alpha_power_hazard(survival::Surv(time, status) ~ X1, data = dat, model = "M1") summary(fit)set.seed(1) dat <- data.frame( time = c(1.2, 0.8, 2.3, 1.5, 3.1), status = c(1, 1, 0, 1, 0), X1 = c(0.5, -0.2, 0.8, 0.1, -0.5) ) fit <- alpha_power_hazard(survival::Surv(time, status) ~ X1, data = dat, model = "M1") summary(fit)
Computes the baseline cumulative hazard and
baseline hazard for the alpha-power hazard distribution.
baseline_hazard(t, par)baseline_hazard(t, par)
t |
positive numeric vector of time points. |
par |
numeric vector of baseline parameters |
Alpha-Power Hazard (par = c(alpha, beta)):
,
.
A list with components:
Numeric vector of cumulative hazard values.
Numeric vector of hazard values.
bh <- baseline_hazard(seq(0.1, 2, by = 0.1), par = c(1.5, 0.8)) plot(seq(0.1, 2, by = 0.1), bh$h0, type = "l", main = "Alpha-Power hazard")bh <- baseline_hazard(seq(0.1, 2, by = 0.1), par = c(1.5, 0.8)) plot(seq(0.1, 2, by = 0.1), bh$h0, type = "l", main = "Alpha-Power hazard")
Approximates the Widely Applicable Information Criterion (WAIC) via bootstrap re-sampling of the log-likelihood.
bootstrap_waic(fit, B = 200)bootstrap_waic(fit, B = 200)
fit |
An object of class |
B |
integer; number of bootstrap iterations (default 200). |
A named list with components WAIC, lppd, p_waic, B_effective.
Compares multiple fitted alpha-power models in a single table.
compare_models(..., B_waic = 100)compare_models(..., B_waic = 100)
... |
fitted objects of class |
B_waic |
integer; bootstrap replicates for WAIC calculation. |
A data frame summarizing model comparisons.
Performs k-fold cross-validation and reports out-of-sample log-likelihood.
cv_alpha_power( time, status, x = matrix(nrow = length(time), ncol = 0), model = "M1", frailty = FALSE, K = 5L )cv_alpha_power( time, status, x = matrix(nrow = length(time), ncol = 0), model = "M1", frailty = FALSE, K = 5L )
time |
positive numeric vector of event/censoring times. |
status |
integer vector of censoring indicators. |
x |
numeric matrix of covariates. |
model |
character; model specification |
frailty |
logical; whether to include frailty. |
K |
integer; number of folds (default 5). |
A list with cross-validation performance metrics.
Creates a summary table of model diagnostic statistics.
diagnostics_table(fit)diagnostics_table(fit)
fit |
An object of class |
A data frame of diagnostic metrics.
Fits an alpha-power hazard regression model via maximum likelihood estimation (MLE). Supports models M1, M2, M3, and M4 from Pal et al. (2026). Handles uncensored and right-, left-, interval-, and progressive-censored data.
fit_alpha_power( time, status, x = matrix(nrow = length(time), ncol = 0), model = c("M1", "M2", "M3", "M4"), frailty = FALSE, time2 = NULL, prog_cen = NULL, init = NULL )fit_alpha_power( time, status, x = matrix(nrow = length(time), ncol = 0), model = c("M1", "M2", "M3", "M4"), frailty = FALSE, time2 = NULL, prog_cen = NULL, init = NULL )
time |
positive numeric vector of event or censoring times. |
status |
integer vector indicating observation type:
|
x |
numeric matrix or data frame of covariates. |
model |
character; one of |
frailty |
logical; whether to include a gamma frailty parameter |
time2 |
numeric vector; upper bound for interval-censored observations. |
prog_cen |
integer vector; progressive censoring scheme. |
init |
numeric vector of initial parameter values on estimation scale. |
An object of class "alpha_power_fit" containing parameter estimates,
standard errors, log-likelihood, AIC, BIC, and model diagnostics.
Computes point estimates and standard errors for the parameters
and of the Alpha-Power Hazard distribution using
five classical estimation methods: Maximum Likelihood Estimation (MLE),
Least Squares Estimation (LSE), Weighted Least Squares Estimation (WLSE),
Maximum Product of Spacings Estimation (MPSE), and Cramér-von Mises
Estimation (CME).
fit_alpha_power_base( x, method = c("mle", "lse", "wlse", "mpse", "cme"), init = NULL )fit_alpha_power_base( x, method = c("mle", "lse", "wlse", "mpse", "cme"), init = NULL )
x |
positive numeric vector of failure time observations. |
method |
character; estimation method. One of |
init |
numeric vector of initial parameters |
An object of class "alpha_power_base_fit" containing:
par |
Estimated parameters |
method |
Estimation method name. |
value |
Optimized objective function value. |
convergence |
Integer code (0 = success). |
hessian |
Hessian matrix at minimum/maximum. |
se |
Standard errors of parameters (if available). |
Pal, S., Tyagi, V., Chesneau, C., & Sharma, V. K. (2026). A New Flexible Hazard Regression Model for Survival Data Analysis Alternative to Cox and AFT Regression Models. Journal of the Indian Society for Probability and Statistics. doi:10.1007/s41096-026-00297-5
set.seed(123) dat <- ralpha_power(50, alpha = 1.5, beta = 0.8) fit_mle <- fit_alpha_power_base(dat, method = "mle") fit_lse <- fit_alpha_power_base(dat, method = "lse") fit_wlse <- fit_alpha_power_base(dat, method = "wlse") fit_mpse <- fit_alpha_power_base(dat, method = "mpse") fit_cme <- fit_alpha_power_base(dat, method = "cme") fit_mle$parset.seed(123) dat <- ralpha_power(50, alpha = 1.5, beta = 0.8) fit_mle <- fit_alpha_power_base(dat, method = "mle") fit_lse <- fit_alpha_power_base(dat, method = "lse") fit_wlse <- fit_alpha_power_base(dat, method = "wlse") fit_mpse <- fit_alpha_power_base(dat, method = "mpse") fit_cme <- fit_alpha_power_base(dat, method = "cme") fit_mle$par
Computes the unique minimum point and minimum
hazard rate for the Alpha-Power Hazard distribution
when .
hrf_min_alpha_power(alpha, beta)hrf_min_alpha_power(alpha, beta)
alpha |
positive numeric (> 1); alpha parameter. |
beta |
positive numeric in (0, 1); beta shape parameter. |
A list containing xmin and hmin.
Computes leverage values, Cook's distance, DFFITS, and DFBETAS.
influence_alpha_power(fit)influence_alpha_power(fit)
fit |
An object of class |
A named list containing influence metrics.
Internal function computing total log-likelihood for uncensored and censored (right, left, interval, progressive) data under models M1-M4.
loglik_alpha_power( par_all, time, status, x, model = "M1", has_frailty = FALSE, time2 = NULL, prog_cen = NULL )loglik_alpha_power( par_all, time, status, x, model = "M1", has_frailty = FALSE, time2 = NULL, prog_cen = NULL )
par_all |
numeric vector of parameters on estimation scale. |
time |
numeric vector of event or censoring times. |
status |
integer vector: 1 = exact event, 0 = right-censored, 2 = left-censored, 3 = interval-censored. |
x |
numeric matrix of covariates. |
model |
character; one of |
has_frailty |
logical; whether frailty parameter is included as last element. |
time2 |
numeric vector; upper bound for interval censoring. |
prog_cen |
integer vector; progressive censoring scheme. |
Scalar log-likelihood value.
Computes the raw moments , central moments,
variance, coefficient of skewness, and coefficient of kurtosis for the
Alpha-Power Hazard distribution.
moments_alpha_power(k = 4, alpha = 1.5, beta = 1.1)moments_alpha_power(k = 4, alpha = 1.5, beta = 1.1)
k |
integer >= 1; maximum moment order to compute. |
alpha |
positive numeric (> 1); alpha parameter. |
beta |
positive numeric (> 0); beta parameter. |
A list with components:
raw_moments |
Numeric vector of raw moments |
mean |
First raw moment |
variance |
Variance |
skewness |
Coefficient of skewness |
kurtosis |
Coefficient of kurtosis |
central_moments |
Numeric vector of central moments |
Computes the PDF or CDF of the -th order statistic from an
independent sample of size drawn from the Alpha-Power Hazard distribution.
order_stats_alpha_power(x, r, n, alpha, beta, type = c("pdf", "cdf"))order_stats_alpha_power(x, r, n, alpha, beta, type = c("pdf", "cdf"))
x |
numeric vector of values. |
r |
integer; rank of order statistic ( |
n |
integer; sample size. |
alpha |
positive numeric (> 1); alpha parameter. |
beta |
positive numeric (> 0); beta parameter. |
type |
character; either |
Numeric vector of PDF or CDF values of .
Generates all 8 diagnostic plots for a fitted alpha-power
hazard model and displays them in the active R graphics device (e.g., the
RStudio Plots pane). Plots are never saved to a file automatically.
To save, wrap the call in pdf() / dev.off() yourself, or
use the save_to_file argument.
plot_all(fit, ask = grDevices::dev.interactive(), save_to_file = NULL)plot_all(fit, ask = grDevices::dev.interactive(), save_to_file = NULL)
fit |
An object of class |
ask |
logical; if |
save_to_file |
character or |
Invisibly returns fit.
This function never saves plots automatically. The
save_to_file argument exists purely for user convenience and is
NULL by default.
set.seed(1) dat <- r_alpha_power_reg(80, par = c(1.5, 0.8), theta = 0.3, cen_type = "right", cen_rate = 0.2) fit <- fit_alpha_power(dat$time, dat$status) # Display all 8 plots in the R graphics window (no file saved): plot_all(fit, ask = FALSE)set.seed(1) dat <- r_alpha_power_reg(80, par = c(1.5, 0.8), theta = 0.3, cen_type = "right", cen_rate = 0.2) fit <- fit_alpha_power(dat$time, dat$status) # Display all 8 plots in the R graphics window (no file saved): plot_all(fit, ask = FALSE)
Plots the PDF, CDF, survival function, and hazard function for the alpha-power hazard distribution over a time grid.
plot_baseline(par, t_range = c(0.01, 3), n_grid = 300)plot_baseline(par, t_range = c(0.01, 3), n_grid = 300)
par |
numeric vector of baseline parameters |
t_range |
numeric vector of length 2 giving the time range. |
n_grid |
integer; number of grid points (default 300). |
Invisibly returns a list with components t (time grid),
f (PDF), F (CDF), S (survival), and h
(hazard) evaluated over the time grid.
plot_baseline(par = c(1.5, 0.8), t_range = c(0.01, 3))plot_baseline(par = c(1.5, 0.8), t_range = c(0.01, 3))
Displays all parameter estimates with 95% confidence intervals as a horizontal forest (dot-and-whisker) plot.
plot_coef_forest(fit, ...)plot_coef_forest(fit, ...)
fit |
An object of class |
... |
additional graphical parameters. |
No return value, called for side effects (plotting).
Plots DFBETAS values as a stem plot for each covariate,
highlighting observations that exceed the threshold in red.
plot_dfbetas(fit, ...)plot_dfbetas(fit, ...)
fit |
An object of class |
... |
additional graphical parameters. |
No return value, called for side effects (plotting).
Displays a histogram of leverage values with a threshold line
at .
plot_leverage(fit, ...)plot_leverage(fit, ...)
fit |
An object of class |
... |
additional graphical parameters. |
No return value, called for side effects (plotting).
Compares sorted Cox-Snell residuals against theoretical quantiles of the standard exponential distribution. Deviations from the diagonal indicate model misfit.
plot_qq_residuals(fit, ...)plot_qq_residuals(fit, ...)
fit |
An object of class |
... |
additional graphical parameters. |
No return value, called for side effects (plotting).
Plots deviance residuals against fitted survival probabilities with a LOWESS smoother to assess linearity and heteroscedasticity.
plot_residuals_fitted(fit, ...)plot_residuals_fitted(fit, ...)
fit |
An object of class |
... |
additional graphical parameters passed to |
No return value, called for side effects (plotting).
Plots deviance residuals against leverage values with Cook's distance contours (D = 0.5 and D = 1) to identify influential points.
plot_residuals_leverage(fit, ...)plot_residuals_leverage(fit, ...)
fit |
An object of class |
... |
additional graphical parameters. |
No return value, called for side effects (plotting).
Plots the square root of absolute deviance residuals against fitted survival probabilities to detect heteroscedasticity.
plot_scale_location(fit, ...)plot_scale_location(fit, ...)
fit |
An object of class |
... |
additional graphical parameters. |
No return value, called for side effects (plotting).
Overlays the Kaplan-Meier curve (empirical) with the model-based survival curve evaluated at the mean covariate vector.
plot_survival_km(fit, ...)plot_survival_km(fit, ...)
fit |
An object of class |
... |
additional graphical parameters. |
No return value, called for side effects (plotting).
Computes survival probabilities, hazard rates, median survival times, expected survival in a window, risk scores, marginal survival, and forecasted survival curves for a fitted alpha-power hazard model.
predict_alpha_power( fit, newdata = NULL, newtime = NULL, type = c("survival", "hazard", "median", "expected", "risk", "marginal", "forecast"), window = NULL ) survival_at(fit, time_points, newdata = NULL) risk_predict(fit, newdata = NULL) forecast_alpha_power(fit, horizon, newdata = NULL, n_grid = 100)predict_alpha_power( fit, newdata = NULL, newtime = NULL, type = c("survival", "hazard", "median", "expected", "risk", "marginal", "forecast"), window = NULL ) survival_at(fit, time_points, newdata = NULL) risk_predict(fit, newdata = NULL) forecast_alpha_power(fit, horizon, newdata = NULL, n_grid = 100)
fit |
An object of class |
newdata |
numeric matrix or data frame of covariates for prediction. |
newtime |
numeric vector of time points for prediction. |
type |
character; prediction type: |
window |
numeric vector of length 2 giving time interval for |
time_points |
numeric vector of time points for |
horizon |
positive numeric; time horizon for |
n_grid |
integer; number of grid points for forecasting. |
Prediction outputs depending on type or helper function invoked.
set.seed(1) dat <- r_alpha_power_reg(50, par = c(1.5, 0.8), cen_type = "right") fit <- fit_alpha_power(dat$time, dat$status) pred_s <- predict_alpha_power(fit, type = "survival")set.seed(1) dat <- r_alpha_power_reg(50, par = c(1.5, 0.8), cen_type = "right") fit <- fit_alpha_power(dat$time, dat$status) pred_s <- predict_alpha_power(fit, type = "survival")
Computes key quantiles (0.125, 0.25, 0.375, 0.5, 0.625, 0.75, 0.875), Bowley's coefficient of skewness, and Moors's coefficient of kurtosis.
quantile_stats_alpha_power(alpha = 1.5, beta = 1.1)quantile_stats_alpha_power(alpha = 1.5, beta = 1.1)
alpha |
positive numeric (> 1); alpha parameter. |
beta |
positive numeric (> 0); beta parameter. |
A list with quantiles, Bowley's skewness (bowley_skewness),
and Moors's kurtosis (moors_kurtosis).
Generates synthetic survival data under the Alpha-Power Hazard regression models (M1-M4) with optional gamma frailty and censoring schemes (right, left, interval, progressive Type-I & Type-II).
r_alpha_power_reg( n, par = c(1.5, 1.1), theta = NULL, x = matrix(nrow = n, ncol = 0), beta = numeric(0), model = "M1", cen_type = c("none", "right", "left", "interval"), cen_rate = 0.1, time2 = NULL )r_alpha_power_reg( n, par = c(1.5, 1.1), theta = NULL, x = matrix(nrow = n, ncol = 0), beta = numeric(0), model = "M1", cen_type = c("none", "right", "left", "interval"), cen_rate = 0.1, time2 = NULL )
n |
integer; sample size. |
par |
numeric vector of baseline parameters |
theta |
positive numeric; frailty variance parameter (optional). |
x |
numeric matrix of covariates. |
beta |
numeric vector of regression coefficients. |
model |
character; one of |
cen_type |
character; censoring type: |
cen_rate |
positive numeric; censoring rate parameter for exponential censoring distribution. |
time2 |
numeric vector; upper bound for interval censoring. |
A data frame with columns time, status, covariates, and optionally time2.
set.seed(123) dat <- r_alpha_power_reg(50, par = c(1.5, 0.8), x = matrix(rnorm(50), ncol = 1), beta = 0.5, cen_type = "right", cen_rate = 0.2) head(dat)set.seed(123) dat <- r_alpha_power_reg(50, par = c(1.5, 0.8), x = matrix(rnorm(50), ncol = 1), beta = 0.5, cen_type = "right", cen_rate = 0.2) head(dat)
Computes a comprehensive set of residuals and goodness-of-fit metrics for a fitted alpha-power hazard model.
residuals_alpha_power(fit)residuals_alpha_power(fit)
fit |
An object of class |
A named list containing residuals, leverage, and fit metrics.
A lightweight single-scenario simulation to quickly verify MLE parameter recovery.
simulate_mle_performance( n_sim = 50L, n = 50L, par = c(1.5, 1.1), beta = numeric(0), model = "M1", frailty = FALSE, theta = 0.5, cen_rate = 0.1 )simulate_mle_performance( n_sim = 50L, n = 50L, par = c(1.5, 1.1), beta = numeric(0), model = "M1", frailty = FALSE, theta = 0.5, cen_rate = 0.1 )
n_sim |
integer; number of replicates. |
n |
integer; sample size. |
par |
numeric vector of true baseline parameters |
beta |
numeric vector of true regression coefficients. |
model |
character; model specification. |
frailty |
logical; whether frailty is included. |
theta |
positive numeric; true frailty variance. |
cen_rate |
numeric; exponential censoring rate. |
A data frame of simulation summary metrics.
Evaluates MLE performance (bias, MSE, coverage, and convergence rate) for a specified alpha-power hazard model across multiple sample sizes and censoring settings.
simulation_study( n_sim = 100L, n_vec = c(50L, 100L), par = c(1.5, 1.1), beta = numeric(0), model = "M1", frailty = FALSE, theta = 0.5, cen_type = "right", cen_rate = 0.2, conf_level = 0.95, verbose = TRUE )simulation_study( n_sim = 100L, n_vec = c(50L, 100L), par = c(1.5, 1.1), beta = numeric(0), model = "M1", frailty = FALSE, theta = 0.5, cen_type = "right", cen_rate = 0.2, conf_level = 0.95, verbose = TRUE )
n_sim |
integer; number of Monte Carlo replicates per scenario. |
n_vec |
integer vector; sample sizes to evaluate. |
par |
numeric vector of true baseline parameters |
beta |
numeric vector of true regression coefficients. |
model |
character; model specification |
frailty |
logical; whether frailty parameter is included. |
theta |
positive numeric; true frailty variance (if |
cen_type |
character; censoring type: |
cen_rate |
positive numeric; censoring rate. |
conf_level |
numeric; nominal coverage probability. |
verbose |
logical; print progress. |
A data frame summarizing simulation metrics.
Verifies stochastic ordering
for and .
stochastic_ordering_alpha_power( alpha1, beta1, alpha2, beta2, x = seq(0.1, 5, by = 0.1) )stochastic_ordering_alpha_power( alpha1, beta1, alpha2, beta2, x = seq(0.1, 5, by = 0.1) )
alpha1, alpha2
|
positive numeric (> 1); alpha parameters. |
beta1, beta2
|
positive numeric (> 0); beta parameters. |
x |
numeric vector of positive evaluation points. |
A list with F1, F2, and logical is_ordered.