R Under development (unstable) (2025-07-22 r88445 ucrt) -- "Unsuffered Consequences" Copyright (C) 2025 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > library(parfm) Loading required package: survival Loading required package: optimx > data(asthma) > head(asthma) Patid Begin End Status Drug Fevent 1 1 0 15 1 0 1 2 1 22 90 1 0 0 3 1 96 325 1 0 0 4 1 329 332 1 0 0 5 1 338 369 1 0 0 6 1 370 412 1 0 0 > asthma <- asthma[asthma$Fevent==0,] > > set.seed(1) > data <- asthma[sample(1:nrow(asthma), 200),] > > parfm(Surv(Begin, End, Status)~Drug, cluster="Patid", + data=data, dist="weibull", frailty="gamma") Frailty distribution: gamma Baseline hazard distribution: Weibull Loglikelihood: -906.338 ESTIMATE SE p-val theta 0.000 rho 0.754 lambda 0.079 Drug -0.004 0.104 0.969 --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Kendall's Tau: 0 Warning messages: 1: In parfm(Surv(Begin, End, Status) ~ Drug, cluster = "Patid", data = data, : optimisation procedure did not converge, conv = : see ?optimx for details 2: In parfm(Surv(Begin, End, Status) ~ Drug, cluster = "Patid", data = data, : negative variances have been replaced by NAs Please, try other initial values or another optimisation method > > data$time <- data$End - data$Begin > > parfm(Surv(time, Status)~Drug, cluster="Patid", data=data, + dist="weibull", frailty="gamma") Frailty distribution: gamma Baseline hazard distribution: Weibull Loglikelihood: -897.482 ESTIMATE SE p-val theta 0.289 0.157 rho 0.901 0.073 lambda 0.028 0.008 Drug -0.024 0.194 0.901 --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Kendall's Tau: 0.126 > > proc.time() user system elapsed 17.15 0.70 17.82