Skip to contents

This function simulates data from a Ornstein–Uhlenbeck (OU) model using a state-space model parameterization and fits the model using the dynr package. The process is repeated R times. It assumes that the parameters remain constant across individuals and over time. At the moment, the function only supports type = 0.

Usage

PBSSMOUFixed(
  R,
  path,
  prefix,
  n,
  time,
  delta_t = 0.1,
  mu0,
  sigma0_l,
  mu,
  phi,
  sigma_l,
  nu,
  lambda,
  theta_l,
  type = 0,
  x = NULL,
  gamma = NULL,
  kappa = NULL,
  mu0_fixed = FALSE,
  sigma0_fixed = FALSE,
  alpha_level = 0.05,
  optimization_flag = TRUE,
  hessian_flag = FALSE,
  verbose = FALSE,
  weight_flag = FALSE,
  debug_flag = FALSE,
  perturb_flag = FALSE,
  xtol_rel = 1e-07,
  stopval = -9999,
  ftol_rel = -1,
  ftol_abs = -1,
  maxeval = as.integer(-1),
  maxtime = -1,
  ncores = NULL,
  seed = NULL,
  clean = TRUE
)

Arguments

R

Positive integer. Number of bootstrap samples.

path

Path to a directory to store bootstrap samples and estimates.

prefix

Character string. Prefix used for the file names for the bootstrap samples and estimates.

n

Positive integer. Number of individuals.

time

Positive integer. Number of time points.

delta_t

Numeric. Time interval (\(\Delta_t\)).

mu0

Numeric vector. Mean of initial latent variable values (\(\boldsymbol{\mu}_{\boldsymbol{\eta} \mid 0}\)).

sigma0_l

Numeric matrix. Cholesky factorization (t(chol(sigma0))) of the covariance matrix of initial latent variable values (\(\boldsymbol{\Sigma}_{\boldsymbol{\eta} \mid 0}\)).

mu

Numeric vector. The long-term mean or equilibrium level (\(\boldsymbol{\mu}\)).

phi

Numeric matrix. The drift matrix which represents the rate of change of the solution in the absence of any random fluctuations (\(\boldsymbol{\Phi}\)). It also represents the rate of mean reversion, determining how quickly the variable returns to its mean.

sigma_l

Numeric matrix. Cholesky factorization (t(chol(sigma))) of the covariance matrix of volatility or randomness in the process (\(\boldsymbol{\Sigma}\)).

nu

Numeric vector. Vector of intercept values for the measurement model (\(\boldsymbol{\nu}\)).

lambda

Numeric matrix. Factor loading matrix linking the latent variables to the observed variables (\(\boldsymbol{\Lambda}\)).

theta_l

Numeric matrix. Cholesky factorization (t(chol(theta))) of the covariance matrix of the measurement error (\(\boldsymbol{\Theta}\)).

type

Integer. State space model type. See Details for more information.

x

List. Each element of the list is a matrix of covariates for each individual i in n. The number of columns in each matrix should be equal to time.

gamma

Numeric matrix. Matrix linking the covariates to the latent variables at current time point (\(\boldsymbol{\Gamma}\)).

kappa

Numeric matrix. Matrix linking the covariates to the observed variables at current time point (\(\boldsymbol{\kappa}\)).

mu0_fixed

Logical. If mu0_fixed = TRUE, fix the initial mean vector to mu0. If mu0_fixed = FALSE, mu0 is estimated.

sigma0_fixed

Logical. If sigma0_fixed = TRUE, fix the initial covariance matrix to tcrossprod(sigma0_l). If sigma0_fixed = FALSE, sigma0 is estimated.

alpha_level

Numeric vector. Significance level \(\alpha\).

optimization_flag

a flag (TRUE/FALSE) indicating whether optimization is to be done.

hessian_flag

a flag (TRUE/FALSE) indicating whether the Hessian matrix is to be calculated.

verbose

a flag (TRUE/FALSE) indicating whether more detailed intermediate output during the estimation process should be printed

weight_flag

a flag (TRUE/FALSE) indicating whether the negative log likelihood function should be weighted by the length of the time series for each individual

debug_flag

a flag (TRUE/FALSE) indicating whether users want additional dynr output that can be used for diagnostic purposes

perturb_flag

a flag (TRUE/FLASE) indicating whether to perturb the latent states during estimation. Only useful for ensemble forecasting.

xtol_rel

Stopping criteria option for parameter optimization. See dynr::dynr.model() for more details.

stopval

Stopping criteria option for parameter optimization. See dynr::dynr.model() for more details.

ftol_rel

Stopping criteria option for parameter optimization. See dynr::dynr.model() for more details.

ftol_abs

Stopping criteria option for parameter optimization. See dynr::dynr.model() for more details.

maxeval

Stopping criteria option for parameter optimization. See dynr::dynr.model() for more details.

maxtime

Stopping criteria option for parameter optimization. See dynr::dynr.model() for more details.

ncores

Positive integer. Number of cores to use. If ncores = NULL, use a single core. Consider using multiple cores when number of bootstrap samples R is a large value.

seed

Random seed.

clean

Logical. If clean = TRUE, delete intermediate files generated by the function.

Value

Returns an object of class bootstatespace which is a list with the following elements:

call

Function call.

args

Function arguments.

thetahatstar

Sampling distribution of \(\boldsymbol{\hat{\theta}}\).

vcov

Sampling variance-covariance matrix of \(\boldsymbol{\hat{\theta}}\).

est

Vector of estimated \(\boldsymbol{\hat{\theta}}\).

fun

Function used ("PBSSMOUFixed").

method

Bootstrap method used ("parametric").

Details

Type 0

The measurement model is given by $$ \mathbf{y}_{i, t} = \boldsymbol{\nu} + \boldsymbol{\Lambda} \boldsymbol{\eta}_{i, t} + \boldsymbol{\varepsilon}_{i, t}, \quad \mathrm{with} \quad \boldsymbol{\varepsilon}_{i, t} \sim \mathcal{N} \left( \mathbf{0}, \boldsymbol{\Theta} \right) $$ where \(\mathbf{y}_{i, t}\), \(\boldsymbol{\eta}_{i, t}\), and \(\boldsymbol{\varepsilon}_{i, t}\) are random variables and \(\boldsymbol{\nu}\), \(\boldsymbol{\Lambda}\), and \(\boldsymbol{\Theta}\) are model parameters. \(\mathbf{y}_{i, t}\) represents a vector of observed random variables, \(\boldsymbol{\eta}_{i, t}\) a vector of latent random variables, and \(\boldsymbol{\varepsilon}_{i, t}\) a vector of random measurement errors, at time \(t\) and individual \(i\). \(\boldsymbol{\nu}\) denotes a vector of intercepts, \(\boldsymbol{\Lambda}\) a matrix of factor loadings, and \(\boldsymbol{\Theta}\) the covariance matrix of \(\boldsymbol{\varepsilon}\).

An alternative representation of the measurement error is given by $$ \boldsymbol{\varepsilon}_{i, t} = \boldsymbol{\Theta}^{\frac{1}{2}} \mathbf{z}_{i, t}, \quad \mathrm{with} \quad \mathbf{z}_{i, t} \sim \mathcal{N} \left( \mathbf{0}, \mathbf{I} \right) $$ where \(\mathbf{z}_{i, t}\) is a vector of independent standard normal random variables and \( \left( \boldsymbol{\Theta}^{\frac{1}{2}} \right) \left( \boldsymbol{\Theta}^{\frac{1}{2}} \right)^{\prime} = \boldsymbol{\Theta} . \)

The dynamic structure is given by $$ \mathrm{d} \boldsymbol{\eta}_{i, t} = \boldsymbol{\Phi} \left( \boldsymbol{\eta}_{i, t} - \boldsymbol{\mu} \right) \mathrm{d}t + \boldsymbol{\Sigma}^{\frac{1}{2}} \mathrm{d} \mathbf{W}_{i, t} $$ where \(\boldsymbol{\mu}\) is the long-term mean or equilibrium level, \(\boldsymbol{\Phi}\) is the rate of mean reversion, determining how quickly the variable returns to its mean, \(\boldsymbol{\Sigma}\) is the matrix of volatility or randomness in the process, and \(\mathrm{d}\boldsymbol{W}\) is a Wiener process or Brownian motion, which represents random fluctuations.

Type 1

The measurement model is given by $$ \mathbf{y}_{i, t} = \boldsymbol{\nu} + \boldsymbol{\Lambda} \boldsymbol{\eta}_{i, t} + \boldsymbol{\varepsilon}_{i, t}, \quad \mathrm{with} \quad \boldsymbol{\varepsilon}_{i, t} \sim \mathcal{N} \left( \mathbf{0}, \boldsymbol{\Theta} \right) . $$

The dynamic structure is given by $$ \mathrm{d} \boldsymbol{\eta}_{i, t} = \boldsymbol{\Phi} \left( \boldsymbol{\eta}_{i, t} - \boldsymbol{\mu} \right) \mathrm{d}t + \boldsymbol{\Gamma} \mathbf{x}_{i, t} + \boldsymbol{\Sigma}^{\frac{1}{2}} \mathrm{d} \mathbf{W}_{i, t} $$ where \(\mathbf{x}_{i, t}\) represents a vector of covariates at time \(t\) and individual \(i\), and \(\boldsymbol{\Gamma}\) the coefficient matrix linking the covariates to the latent variables.

Type 2

The measurement model is given by $$ \mathbf{y}_{i, t} = \boldsymbol{\nu} + \boldsymbol{\Lambda} \boldsymbol{\eta}_{i, t} + \boldsymbol{\kappa} \mathbf{x}_{i, t} + \boldsymbol{\varepsilon}_{i, t}, \quad \mathrm{with} \quad \boldsymbol{\varepsilon}_{i, t} \sim \mathcal{N} \left( \mathbf{0}, \boldsymbol{\Theta} \right) $$ where \(\boldsymbol{\kappa}\) represents the coefficient matrix linking the covariates to the observed variables.

The dynamic structure is given by $$ \mathrm{d} \boldsymbol{\eta}_{i, t} = \boldsymbol{\Phi} \left( \boldsymbol{\eta}_{i, t} - \boldsymbol{\mu} \right) \mathrm{d}t + \boldsymbol{\Gamma} \mathbf{x}_{i, t} + \boldsymbol{\Sigma}^{\frac{1}{2}} \mathrm{d} \mathbf{W}_{i, t} . $$

The OU model as a linear stochastic differential equation model

The OU model is a first-order linear stochastic differential equation model in the form of

$$ \mathrm{d} \boldsymbol{\eta}_{i, t} = \left( \boldsymbol{\iota} + \boldsymbol{\Phi} \boldsymbol{\eta}_{i, t} \right) \mathrm{d}t + \boldsymbol{\Sigma}^{\frac{1}{2}} \mathrm{d} \mathbf{W}_{i, t} $$ where \(\boldsymbol{\mu} = - \boldsymbol{\Phi}^{-1} \boldsymbol{\iota}\) and, equivalently \(\boldsymbol{\iota} = - \boldsymbol{\Phi} \boldsymbol{\mu}\).

References

Chow, S.-M., Ho, M. R., Hamaker, E. L., & Dolan, C. V. (2010). Equivalence and differences between structural equation modeling and state-space modeling techniques. Structural Equation Modeling: A Multidisciplinary Journal, 17(2), 303–332. doi:10.1080/10705511003661553

See also

Other Bootstrap for State Space Models Functions: PBSSMFixed(), PBSSMLinSDEFixed(), PBSSMVARFixed()

Author

Ivan Jacob Agaloos Pesigan

Examples

# \donttest{
# prepare parameters
## number of individuals
n <- 5
## time points
time <- 50
delta_t <- 0.10
## dynamic structure
p <- 2
mu0 <- c(-3.0, 1.5)
sigma0 <- 0.001 * diag(p)
sigma0_l <- t(chol(sigma0))
mu <- c(5.76, 5.18)
phi <- matrix(
  data = c(
    -0.10,
    0.05,
    0.05,
    -0.10
  ),
  nrow = p
)
sigma <- matrix(
  data = c(
    2.79,
    0.06,
    0.06,
    3.27
  ),
  nrow = p
)
sigma_l <- t(chol(sigma))
## measurement model
k <- 2
nu <- rep(x = 0, times = k)
lambda <- diag(k)
theta <- 0.001 * diag(k)
theta_l <- t(chol(theta))

path <- tempdir()

pb <- PBSSMOUFixed(
  R = 10L, # use at least 1000 in actual research
  path = path,
  prefix = "ou",
  n = n,
  time = time,
  delta_t = delta_t,
  mu0 = mu0,
  sigma0_l = sigma0_l,
  mu = mu,
  phi = phi,
  sigma_l = sigma_l,
  nu = nu,
  lambda = lambda,
  theta_l = theta_l,
  type = 0,
  ncores = 1, # consider using multiple cores
  seed = 42
)
print(pb)
#> Call:
#> PBSSMOUFixed(R = 10L, path = path, prefix = "ou", n = n, time = time, 
#>     delta_t = delta_t, mu0 = mu0, sigma0_l = sigma0_l, mu = mu, 
#>     phi = phi, sigma_l = sigma_l, nu = nu, lambda = lambda, theta_l = theta_l, 
#>     type = 0, ncores = 1, seed = 42)
#> 
#> Parametric bootstrap confidence intervals.
#> type = "pc"
#>               est      se  R     2.5%   97.5%
#> phi_1_1    -0.100  0.1121 10  -0.4299 -0.0979
#> phi_2_1     0.050  0.2090 10  -0.1890  0.3585
#> phi_1_2     0.050  0.2549 10  -0.1524  0.5515
#> phi_2_2    -0.100  0.2801 10  -0.7518  0.0733
#> mu_1_1      5.760 17.5412 10  -0.1145 46.4755
#> mu_2_1      5.180 16.5698 10 -18.3931 35.8675
#> sigma_1_1   2.790  0.2068 10   2.4150  2.9959
#> sigma_2_1   0.060  0.1520 10  -0.2386  0.2020
#> sigma_2_2   3.270  0.1900 10   2.9998  3.4951
#> theta_1_1   0.001  0.0008 10   0.0000  0.0022
#> theta_2_2   0.001  0.0006 10   0.0000  0.0013
#> mu0_1_1    -3.000  0.0110 10  -3.0157 -2.9836
#> mu0_2_1     1.500  0.0250 10   1.4730  1.5375
#> sigma0_1_1  0.001  0.0009 10   0.0000  0.0021
#> sigma0_2_2  0.001  0.0020 10   0.0000  0.0047
summary(pb)
#>               est      se  R     2.5%   97.5%
#> phi_1_1    -0.100  0.1121 10  -0.4299 -0.0979
#> phi_2_1     0.050  0.2090 10  -0.1890  0.3585
#> phi_1_2     0.050  0.2549 10  -0.1524  0.5515
#> phi_2_2    -0.100  0.2801 10  -0.7518  0.0733
#> mu_1_1      5.760 17.5412 10  -0.1145 46.4755
#> mu_2_1      5.180 16.5698 10 -18.3931 35.8675
#> sigma_1_1   2.790  0.2068 10   2.4150  2.9959
#> sigma_2_1   0.060  0.1520 10  -0.2386  0.2020
#> sigma_2_2   3.270  0.1900 10   2.9998  3.4951
#> theta_1_1   0.001  0.0008 10   0.0000  0.0022
#> theta_2_2   0.001  0.0006 10   0.0000  0.0013
#> mu0_1_1    -3.000  0.0110 10  -3.0157 -2.9836
#> mu0_2_1     1.500  0.0250 10   1.4730  1.5375
#> sigma0_1_1  0.001  0.0009 10   0.0000  0.0021
#> sigma0_2_2  0.001  0.0020 10   0.0000  0.0047
confint(pb)
#>                    2.5 %       97.5 %
#> phi_1_1    -4.299497e-01 -0.097851049
#> phi_2_1    -1.889892e-01  0.358461692
#> phi_1_2    -1.524410e-01  0.551539224
#> phi_2_2    -7.518428e-01  0.073305346
#> mu_1_1     -1.145149e-01 46.475539280
#> mu_2_1     -1.839307e+01 35.867508640
#> sigma_1_1   2.415048e+00  2.995855339
#> sigma_2_1  -2.386130e-01  0.201978103
#> sigma_2_2   2.999791e+00  3.495110318
#> theta_1_1   2.047164e-20  0.002190152
#> theta_2_2   3.993967e-15  0.001347848
#> mu0_1_1    -3.015728e+00 -2.983648643
#> mu0_2_1     1.473001e+00  1.537463816
#> sigma0_1_1  3.849675e-14  0.002105113
#> sigma0_2_2  1.389864e-16  0.004749876
vcov(pb)
#>                  phi_1_1       phi_2_1       phi_1_2       phi_2_2
#> phi_1_1     1.257624e-02 -8.568968e-03 -2.080176e-02 -2.195136e-03
#> phi_2_1    -8.568968e-03  4.366183e-02  3.067842e-02 -3.749987e-02
#> phi_1_2    -2.080176e-02  3.067842e-02  6.497826e-02 -1.138220e-02
#> phi_2_2    -2.195136e-03 -3.749987e-02 -1.138220e-02  7.847953e-02
#> mu_1_1     -8.324203e-02 -4.898370e-02  7.909102e-01 -3.925981e-02
#> mu_2_1     -1.035602e+00  1.352011e+00  2.767269e+00  1.016360e+00
#> sigma_1_1   8.728227e-03  1.424105e-02 -2.119593e-02 -4.376327e-02
#> sigma_2_1   9.301139e-03 -5.212394e-03 -1.044109e-02 -2.135751e-02
#> sigma_2_2  -5.057923e-03  1.686322e-02  2.169282e-02 -5.087701e-03
#> theta_1_1  -1.385641e-05  4.777764e-05  1.993931e-05  1.478306e-05
#> theta_2_2   1.233515e-05 -2.789183e-05 -1.025475e-05  6.049828e-05
#> mu0_1_1     6.252507e-04 -1.024925e-04 -1.331778e-03 -1.346019e-03
#> mu0_2_1     5.561032e-04  3.732341e-04 -1.662070e-03  1.751828e-03
#> sigma0_1_1  3.145341e-05 -1.190031e-05 -6.703418e-05 -1.276839e-04
#> sigma0_2_2 -3.144040e-05  1.523709e-04 -2.131209e-06 -2.277832e-04
#>                   mu_1_1        mu_2_1     sigma_1_1     sigma_2_1
#> phi_1_1    -8.324203e-02  -1.035601618  8.728227e-03  9.301139e-03
#> phi_2_1    -4.898370e-02   1.352010523  1.424105e-02 -5.212394e-03
#> phi_1_2     7.909102e-01   2.767268977 -2.119593e-02 -1.044109e-02
#> phi_2_2    -3.925981e-02   1.016360401 -4.376327e-02 -2.135751e-02
#> mu_1_1      3.076943e+02  59.666953508  4.050331e-01  5.925189e-01
#> mu_2_1      5.966695e+01 274.559371058 -1.731122e+00 -1.703492e+00
#> sigma_1_1   4.050331e-01  -1.731122284  4.275492e-02  1.547843e-02
#> sigma_2_1   5.925189e-01  -1.703491566  1.547843e-02  2.311192e-02
#> sigma_2_2   9.443886e-01   0.710359847  4.128853e-03 -6.081077e-03
#> theta_1_1  -3.258928e-03   0.002960687 -3.815606e-06 -7.913358e-05
#> theta_2_2   9.241816e-03   0.002693798 -9.676339e-06 -1.764450e-06
#> mu0_1_1    -7.213094e-02  -0.122234807  1.434826e-03  9.251777e-04
#> mu0_2_1     1.384580e-01  -0.055059759  7.537726e-04 -5.032274e-04
#> sigma0_1_1 -9.229027e-05  -0.006786605  1.031865e-04  9.906573e-05
#> sigma0_2_2 -1.823011e-02  -0.004003851  1.470355e-04  3.178681e-05
#>                sigma_2_2     theta_1_1     theta_2_2       mu0_1_1
#> phi_1_1    -5.057923e-03 -1.385641e-05  1.233515e-05  6.252507e-04
#> phi_2_1     1.686322e-02  4.777764e-05 -2.789183e-05 -1.024925e-04
#> phi_1_2     2.169282e-02  1.993931e-05 -1.025475e-05 -1.331778e-03
#> phi_2_2    -5.087701e-03  1.478306e-05  6.049828e-05 -1.346019e-03
#> mu_1_1      9.443886e-01 -3.258928e-03  9.241816e-03 -7.213094e-02
#> mu_2_1      7.103598e-01  2.960687e-03  2.693798e-03 -1.222348e-01
#> sigma_1_1   4.128853e-03 -3.815606e-06 -9.676339e-06  1.434826e-03
#> sigma_2_1  -6.081077e-03 -7.913358e-05 -1.764450e-06  9.251777e-04
#> sigma_2_2   3.610609e-02  4.817568e-05  2.643107e-05  1.449178e-04
#> theta_1_1   4.817568e-05  7.166276e-07 -3.861286e-08 -2.755199e-06
#> theta_2_2   2.643107e-05 -3.861286e-08  3.721091e-07 -2.953469e-06
#> mu0_1_1     1.449178e-04 -2.755199e-06 -2.953469e-06  1.210159e-04
#> mu0_2_1     1.024676e-03  7.565769e-06  7.652731e-06 -6.654761e-05
#> sigma0_1_1 -2.864729e-05 -5.908546e-07 -1.256564e-07  7.670170e-06
#> sigma0_2_2  1.582927e-05 -4.663689e-07 -8.219677e-07  1.484417e-05
#>                  mu0_2_1    sigma0_1_1    sigma0_2_2
#> phi_1_1     5.561032e-04  3.145341e-05 -3.144040e-05
#> phi_2_1     3.732341e-04 -1.190031e-05  1.523709e-04
#> phi_1_2    -1.662070e-03 -6.703418e-05 -2.131209e-06
#> phi_2_2     1.751828e-03 -1.276839e-04 -2.277832e-04
#> mu_1_1      1.384580e-01 -9.229027e-05 -1.823011e-02
#> mu_2_1     -5.505976e-02 -6.786605e-03 -4.003851e-03
#> sigma_1_1   7.537726e-04  1.031865e-04  1.470355e-04
#> sigma_2_1  -5.032274e-04  9.906573e-05  3.178681e-05
#> sigma_2_2   1.024676e-03 -2.864729e-05  1.582927e-05
#> theta_1_1   7.565769e-06 -5.908546e-07 -4.663689e-07
#> theta_2_2   7.652731e-06 -1.256564e-07 -8.219677e-07
#> mu0_1_1    -6.654761e-05  7.670170e-06  1.484417e-05
#> mu0_2_1     6.231900e-04 -1.082977e-05 -2.047552e-05
#> sigma0_1_1 -1.082977e-05  8.350329e-07  1.134016e-06
#> sigma0_2_2 -2.047552e-05  1.134016e-06  4.043062e-06
coef(pb)
#>    phi_1_1    phi_2_1    phi_1_2    phi_2_2     mu_1_1     mu_2_1  sigma_1_1 
#>     -0.100      0.050      0.050     -0.100      5.760      5.180      2.790 
#>  sigma_2_1  sigma_2_2  theta_1_1  theta_2_2    mu0_1_1    mu0_2_1 sigma0_1_1 
#>      0.060      3.270      0.001      0.001     -3.000      1.500      0.001 
#> sigma0_2_2 
#>      0.001 
print(pb, type = "bc") # bias-corrected
#> Call:
#> PBSSMOUFixed(R = 10L, path = path, prefix = "ou", n = n, time = time, 
#>     delta_t = delta_t, mu0 = mu0, sigma0_l = sigma0_l, mu = mu, 
#>     phi = phi, sigma_l = sigma_l, nu = nu, lambda = lambda, theta_l = theta_l, 
#>     type = 0, ncores = 1, seed = 42)
#> 
#> Parametric bootstrap confidence intervals.
#> type = "bc"
#>               est      se  R     2.5%   97.5%
#> phi_1_1    -0.100  0.1121 10  -0.1763 -0.0972
#> phi_2_1     0.050  0.2090 10  -0.1890  0.3585
#> phi_1_2     0.050  0.2549 10  -0.1532  0.4014
#> phi_2_2    -0.100  0.2801 10  -0.3337  0.0817
#> mu_1_1      5.760 17.5412 10  -0.3628 44.8531
#> mu_2_1      5.180 16.5698 10 -18.3931 35.8675
#> sigma_1_1   2.790  0.2068 10   2.4150  2.9959
#> sigma_2_1   0.060  0.1520 10  -0.1439  0.2382
#> sigma_2_2   3.270  0.1900 10   2.9948  3.4753
#> theta_1_1   0.001  0.0008 10   0.0000  0.0021
#> theta_2_2   0.001  0.0006 10   0.0000  0.0014
#> mu0_1_1    -3.000  0.0110 10  -3.0158 -2.9862
#> mu0_2_1     1.500  0.0250 10   1.4723  1.5333
#> sigma0_1_1  0.001  0.0009 10   0.0000  0.0021
#> sigma0_2_2  0.001  0.0020 10   0.0000  0.0048
summary(pb, type = "bc")
#>               est      se  R     2.5%   97.5%
#> phi_1_1    -0.100  0.1121 10  -0.1763 -0.0972
#> phi_2_1     0.050  0.2090 10  -0.1890  0.3585
#> phi_1_2     0.050  0.2549 10  -0.1532  0.4014
#> phi_2_2    -0.100  0.2801 10  -0.3337  0.0817
#> mu_1_1      5.760 17.5412 10  -0.3628 44.8531
#> mu_2_1      5.180 16.5698 10 -18.3931 35.8675
#> sigma_1_1   2.790  0.2068 10   2.4150  2.9959
#> sigma_2_1   0.060  0.1520 10  -0.1439  0.2382
#> sigma_2_2   3.270  0.1900 10   2.9948  3.4753
#> theta_1_1   0.001  0.0008 10   0.0000  0.0021
#> theta_2_2   0.001  0.0006 10   0.0000  0.0014
#> mu0_1_1    -3.000  0.0110 10  -3.0158 -2.9862
#> mu0_2_1     1.500  0.0250 10   1.4723  1.5333
#> sigma0_1_1  0.001  0.0009 10   0.0000  0.0021
#> sigma0_2_2  0.001  0.0020 10   0.0000  0.0048
confint(pb, type = "bc")
#>                    2.5 %       97.5 %
#> phi_1_1    -1.763001e-01 -0.097215403
#> phi_2_1    -1.889892e-01  0.358461692
#> phi_1_2    -1.532111e-01  0.401366134
#> phi_2_2    -3.336856e-01  0.081651472
#> mu_1_1     -3.627641e-01 44.853142707
#> mu_2_1     -1.839307e+01 35.867508640
#> sigma_1_1   2.415048e+00  2.995855339
#> sigma_2_1  -1.438877e-01  0.238220036
#> sigma_2_2   2.994832e+00  3.475302415
#> theta_1_1   1.799215e-20  0.002077927
#> theta_2_2   3.579658e-12  0.001354334
#> mu0_1_1    -3.015769e+00 -2.986220287
#> mu0_2_1     1.472278e+00  1.533275935
#> sigma0_1_1  6.300405e-11  0.002145621
#> sigma0_2_2  8.786878e-13  0.004833874
# }