1

UPDATED with dataset and code: dataset code

I have a Cox regression and an ATF regression with the same covariates and dependent variables in R; that is, the only difference between the two is the modeling function. I'm trying to get the confidence interval for each parameter estimate using confint(). I'm not referring to the confidence bands of the survival curve/probability, but rather the CI around each parameter estimate.

The Cox model:

os_coxph <- coxph(os_surv ~ age_lot1 + gendermale + racegpBlack + racegpOther
                  + risk_cytogenetic1 + risk_cytogenetic2
                  + dxStageI + dxStageII + dxStageIII + dxLeukemia
                  + lot_rxcnt_1_1 + sctLOT1 + sctLater + lag46plus + cluster(UID),
                  weights=wt, data = test)
confint(os_coxph)

The ATF model (Weibull distribution):

os_tfw1 <- survreg(os_surv ~ age_lot1 + gendermale + racegpBlack + racegpOther
                   + risk_cytogenetic1 + risk_cytogenetic2
                   + dxStageI + dxStageII + dxStageIII + dxLeukemia
                   + lot_rxcnt_1_1 + sctLOT1 + sctLater + lag46plus + cluster(UID),
                   weights = wt, data = test)
confint(os_tfw1)

The former (Cox) outputs:

                        2.5 %    97.5 %
age_lot1           0.01868637 0.1679876
gendermale        -0.66575169 0.6323086
racegpBlack       -0.90640810 4.2957683
etc.

All as expected. But the latter (ATF) outputs full of NAs:

                  2.5 % 97.5 %
(Intercept)          NA     NA
age_lot1             NA     NA
gendermale           NA     NA
racegpBlack          NA     NA

I also have a similar logistic regression model and it has no problem outputting the confidence intervals for the parameter estimates.

Is confint() unable to take ATF models as an argument? Or is there something I'm missing? Is there an alternative that works on ATF models fit with survreg? TIA.

MWolcott
  • 23
  • 4
  • could we have a [mcve] please ... ? – Ben Bolker Feb 09 '22 at 04:51
  • Could [this package](https://cran.r-project.org/web/packages/ciTools/vignettes/ciTools_survreg_vignette.html) be of any help? – Francesco Grossetti Feb 09 '22 at 08:10
  • I did eventually find out that `confint()` should be able to take `survreg` models as an argument. With that information I'd like to do a little more digging into what's going on so that I can post a more intelligent question to follow up. I'm working on it! – MWolcott Feb 09 '22 at 14:39
  • @FrancescoGrossetti I had looked at that, and unfortunately, my model is (has to be) weighted. – MWolcott Feb 09 '22 at 19:53
  • @BenBolker I've updated the question with the dataset and code. So far I have identified that it appears to have something to do with the two "continuous" covariates, `age_lot1` and `rxcnt_1_1`. All the rest of the covariates are dummies. As soon as I put in either of these variables the ATF CIs go all NA. – MWolcott Feb 09 '22 at 20:58
  • 2
    In "this is so dumb" department - I just tried running the exact same script on another machine and it has no problem. The original machine is running R version 3.6 due to some OS constraints but the PC is running R version 4. I guess `confint()` had some issues in 3.6? Thanks everyone for your help/willingness to help! – MWolcott Feb 09 '22 at 21:37

0 Answers0