全部版块 我的主页
论坛 计量经济学与统计论坛 五区 计量经济学与统计软件 HLM专版
2634 0
2014-04-30

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.

二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

相关推荐
栏目导航
热门文章
推荐文章

说点什么

分享

扫码加好友,拉您进群
各岗位、行业、专业交流群