Skip to contents

Basic print of ctsmTMB objects

Usage

# S3 method for ctsmTMB
print(x, ...)

Arguments

x

an object of class 'ctsmTMB'

...

additional arguments (not in use)

Value

Print of ctsmTMB model object

Examples

library(ctsmTMB)
model <- ctsmTMB$new()

# print empty model
print(model)
#> ctsmTMB model object:              
#> States       0
#> Diffusions   0
#> Observations 0
#> Inputs       0
#> Parameters   0

# add elements to model and see new print
model$addSystem(dx ~ theta * (mu+u-x) * dt + sigma_x*dw)
model$addObs(y ~ x)
model$setVariance(y ~ sigma_y^2)
model$addInput(u)
model$setParameter(
  theta   = c(initial = 1, lower=1e-5, upper=50),
  mu      = c(initial=1.5, lower=0, upper=5),
  sigma_x = c(initial=1, lower=1e-10, upper=30),
  sigma_y = 1e-2
)
print(model)
#> ctsmTMB model object:              
#> States       1
#> Diffusions   1
#> Observations 1
#> Inputs       1
#> Parameters   4
#> 
#> System Equations:
#> 
#> 	 dx ~ theta * (mu + u - x) * dt + sigma_x * dw 
#> 
#> Observation Equations:
#> 
#> 	 y:  y ~ x + e 	 e ~ N(0, sigma_y^2) 
#> 
#> 
#> Free Parameters:
#> 	 theta, mu, sigma_x
#> 
#> Fixed Parameters:
#> 	 sigma_y