Skip to contents

Creates LaTex and a PDF (if LaTeX compiler available) using the tools in the Hmisc package. The files are saved in the working directory.

Usage

# S3 method for marssMODEL
toLatex(object, ..., file = NULL, digits = 2, greek = TRUE, orientation = "landscape", 
math.sty = "amsmath", output = c("pdf", "tex", "rawtex"), replace = TRUE, simplify = TRUE)
# S3 method for marssMLE
toLatex(object, ..., file = NULL, digits = 2, greek = TRUE, orientation = "landscape", 
math.sty = "amsmath", output = c("pdf", "tex", "rawtex"), replace = TRUE, simplify = TRUE)

Arguments

object

A marssMODEL or marssMLE object.

...

Other arguments. Not used.

file

Name of file to save to. Optional.

digits

Number of digits to display for numerical values (if real).

greek

Use greek symbols.

orientation

Orientation to use. landscape or portrait.

math.sty

LaTeX math styling to use.

output

pdf, tex or rawtex. If blank, both are output.

replace

Replace existing file if present.

simplify

If TRUE, then if \(\mathbf{B}\) or \(\mathbf{Z}\) are identity, they do not appear. Any zero-ed out elements also do not appear.

Value

A LaTeX and or PDF file of the model.

Author

Eli Holmes, NOAA, Seattle, USA.

Examples

# Example with linear constraints
dat <- t(harborSeal)
dat <- dat[c(2:4), ]
Z1 <- matrix(list("1*z1+-1*z2",0,"z2","2*z1","z1",0),3,2)
A1 <- matrix(list("a1",0,0),3,1)
MLEobj <- MARSS(dat, model=list(Z=Z1, A=A1, Q=diag(0.01,2)))
#> Success! abstol and log-log tests passed at 67 iterations.
#> Alert: conv.test.slope.tol is 0.5.
#> Test with smaller values (<0.1) to ensure convergence.
#> 
#> MARSS fit is
#> Estimation method: kem 
#> Convergence test: conv.test.slope.tol = 0.5, abstol = 0.001
#> Estimation converged in 67 iterations. 
#> Log-likelihood: -1.181315 
#> AIC: 18.36263   AICc: 21.56263   
#>  
#>        Estimate
#> Z.z1     1.5426
#> Z.z2     1.9683
#> A.a1    -5.7490
#> R.diag   0.0242
#> U.X1     0.0348
#> U.X2     0.0245
#> x0.X1    2.9501
#> x0.X2    4.6597
#> Initial states (x0) defined at t=0
#> 
#> Standard errors have not been calculated. 
#> Use MARSSparamCIs to compute CIs and bias estimates.
#> 
 if (FALSE) {
 toLatex(MLEobj)
 toLatex(MLEobj$model)
 }