1

I have been trying unsuccessfully to do Net Reclassification Index (NRI) and Integrated Discrimination Improvement (IDI) using the packages “PredictABEL” and “survIDINRI”.

Here I post the code I have been using for the “survIDINRI” one. The idea is to see whether the variable “glst_new” (or gcst_new, grst_new) can improve classification of risk done by the variable “lvef_low”. Let me know if you need any more information about the variables.

I get the following error message:

Error in unoecdf(cc, pdiff[cont], PTB.Vi[cont]) : NA/NaN/Inf in foreign function call (arg 5)

Below the code:

D<- select(ICI_strain_cases, redcap_id, admission_fu_event, cvdeath_vf_shock_chb_arr,
            age_ici, sex___1, lvef_low, glst_new, gcst_new, grst_new)

D$cvdeath_vf_shock_chb_arr=as.numeric(D$cvdeath_vf_shock_chb_arr==1)
D=D[!is.na(apply(D,1,mean)),] ; dim(D)
mydata=D[1:75,]
t0=365
indata=select(mydata, admission_fu_event, cvdeath_vf_shock_chb_arr)
indata1=select(mydata, redcap_id:lvef_low)
indata0=select(mydata, redcap_id:sex___1, glst_new)
covs1=as.matrix(indata1[,c(-1, -2, -3)])
covs0=as.matrix(indata0[,c(-1, -2, -3)])

IDI.INF(indata, covs0, covs1, t0, npert = 300, npert.rand = NULL, seed1 = NULL, alpha = 0.05)

Thank you very much

2
  • 1
    Usually this arises because there are NAs, NaNs, Infs or -Infs in the data. You can check with is.na( ), is.nan( ) and is.infinite( ), e.g. any(is.na(indata)). May 18, 2021 at 18:59
  • Thank you slamballais. I ran: any(is.na(indata)) and got [1] FALSE. The original dataset "ICI_strain_cases" does have missing data, but the setting up of "indata" excludes all NAs ## here: D=D[!is.na(apply(D,1,mean)),] ; dim(D) mydata=D[1:75,] ## Would you have any other suggestion? Thank you very much for the help.
    – quinaglia
    May 19, 2021 at 2:41

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.