# NOT RUN {
data("sanctionsData")
f1 <- sq+cd+sf+bd ~ sqrt(senderecondep) + senderdemocracy + contig + ally -1|#SA
anticipatedsendercosts|#VA
sqrt(targetecondep) + anticipatedtargetcosts + contig + ally|#CB
sqrt(senderecondep) + senderdemocracy + lncaprat | #barWA
targetdemocracy + lncaprat| #barWB
senderdemocracy| #bara
-1#VB
## Using Nested-Pseudo Likelihood with default first stage
# }
# NOT RUN {
fit1 <- sigint(f1, data=sanctionsData, npl.trace=TRUE)
# }
# NOT RUN {
## Using Pseudo Likelihood with user made first stage
Phat <- list(PRhat=sanctionsData$PRhat, PFhat=sanctionsData$PFhat)
fit2 <- sigint(f1, data=sanctionsData, method="pl", phat=Phat)
## Using Pseudo Likelihood with default first stage and bootstrapped standard errors
# }
# NOT RUN {
fit3 <- sigint(f1, data=sanctionsData, method="pl", pl.vcov=25)
# }
# NOT RUN {
## Simple regression table
toLatexTable(fit2)
## More options: multiple models and user supplied standard errors
# }
# NOT RUN {
toLatexTable(fit1, fit2, fit3,
se.list=list(sqrt(diag(vcov(fit1))),
sqrt(diag(vcov(fit3))),
sqrt(diag(vcov(fit3)))),
stars="all",
caption = "Economic Sanctions",
label = "tab:sanctions",
model.names = c("NPL", "PL", "PL"))
# }
# NOT RUN {
# }
# NOT RUN {
## More options, from print.xtable including printing to a file
toLatexTable(fit1, fit2, fit3,
caption = "Economic Sanctions",
label = "tab:sanctions",
model.names = c("NPL", "PL", "PL"),
print.xtable.options=list(file="myTable.tex",
booktabs=TRUE))
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab