xtable-like function for class ``spdur''.

# S3 method for spdur
xtable(x, ...)

Arguments

x

An object with class spdur.

Further arguments passed to xtable.

Value

An object with class xtable.

Details

Format a split-duration model for export to Latex or html.

See also

xtable, or as.data.frame.spdur for a simpler alternative that will convert a spdur object to a data frame containing model parameter estimates.

For print formatting, see print.xtable.

Examples

library(xtable) data(model.coups) xtable(model.coups)
#> % latex table generated in R 3.6.0 by xtable 1.8-4 package #> % Thu Aug 29 15:31:16 2019 #> \begin{table}[ht] #> \centering #> \begin{tabular}{rlrrrr} #> \hline #> & Parameter & Estimate & Std. Error & t value & Pr($>$$|$t$|$) \\ #> \hline #> 1 & Dur\_(Intercept) & 4.00 & 0.24 & 16.84 & 0.00 \\ #> 2 & Dur\_polity2 & 0.21 & 0.03 & 6.78 & 0.00 \\ #> 3 & log(alpha) & -0.03 & 0.12 & -0.27 & 0.79 \\ #> 4 & Risk\_(Intercept) & 6.53 & 3.26 & 2.01 & 0.04 \\ #> 5 & Risk\_polity2 & 0.90 & 0.41 & 2.20 & 0.03 \\ #> \hline #> \end{tabular} #> \end{table}
print(xtable(model.coups), include.rownames=FALSE)
#> % latex table generated in R 3.6.0 by xtable 1.8-4 package #> % Thu Aug 29 15:31:16 2019 #> \begin{table}[ht] #> \centering #> \begin{tabular}{lrrrr} #> \hline #> Parameter & Estimate & Std. Error & t value & Pr($>$$|$t$|$) \\ #> \hline #> Dur\_(Intercept) & 4.00 & 0.24 & 16.84 & 0.00 \\ #> Dur\_polity2 & 0.21 & 0.03 & 6.78 & 0.00 \\ #> log(alpha) & -0.03 & 0.12 & -0.27 & 0.79 \\ #> Risk\_(Intercept) & 6.53 & 3.26 & 2.01 & 0.04 \\ #> Risk\_polity2 & 0.90 & 0.41 & 2.20 & 0.03 \\ #> \hline #> \end{tabular} #> \end{table}