[R] ERROR WITH SURVBAYES FUNCTION

silviafigini at eco.unipv.it silviafigini at eco.unipv.it
Thu Mar 16 09:46:10 CET 2006


I would like to use survBayes function, but I have a critical error:

Error in rep.default(0, int.number - 3) : not valid number of pairs in rep()!

(in the italian version: Errore in rep.default(0, int.number - 3) : numero
non valido di copie in
rep()

I have a data with 25 covariates and a status variable (censoring
indicator) and only a duration time. This data is right censored.

This is the code that I use:

My data set: 22 variables (only dummy - binary variables) and 3500
observations.

The censor is right.

# Import the data
multi<-read.csv("C:\\Documents and
Settings\\user\\Desktop\\cambridge\\data_multilevel_canale_noleggio.csv",
header=TRUE, sep=";")
attach(multi)
fix(multi)
names(multi)

a<-survBayes(Surv(durata,stato,type="right")~ESG_ATTIVAZIONI+ESG_INFO_DISCONNESSIONE+ESG_PROBLEMI_TECNICI+ESG_VARIAZIONI_CONTRATTUALI+PACCHETTO_CINEMA_CALCIO+OFFERTA_ONLY_DECODER+OFFERTA_PRONTO_SKY+ESG_GESTIONE_AMMINISTRATIVA+ESG_METODO_DI_PAGAMENTO+ESG_PROMOZIONI+PACCHETTO_CINEMA_SPORT+MOP_PO+AREA_NIELSEN_SUD_ISOLE+OFFERTA_ONLY_SMART_CARD+COMPANY_OLD_SKY_ITALIA,data=multi,burn.in=1000,number.sample=2000)

The strata variables are not supported.

Other functions or suggestions to run bayesian cox model with R?


Many thanks,
Silvia




More information about the R-help mailing list