We are trying to reproduce the results of an accelarated failure time (aft) model in R, which has been coded in SAS.
The data set we use is here
There you can find the SAS code as well.
formula <- survreg(Surv(Duration, Censor) ~ Acq_Expense + Acq_Expense_SQ + Ret_Expense + Ret_Expense_SQ + Crossbuy + Frequency + Frequency_SQ + Industry + Revenue + Employees, dist='weibull', data = daten [daten$Acquisition==1, ]) out1 <- survreg(formula = formula, data = daten [daten$Acquisition==1, ], dist = "weibull") summary(out1) ind <- c("Duration", "Censor")err.mat <- ???
out2 <- simexaft(formula = formula, data = daten [daten$Acquisition==1, ], SIMEXvariable = ind, repeated = FALSE, err.mat = err.mat, dist = "weibull") summary(out2)
Our question is how to define the err.mat term? err.mat specifies the variables with measurement errors. Since our data set is right censored I thought the variables with measurement error are probably Duration and/or Censor. But it is not as simple as that, err.mat must be a square symmetric numeric matrix.