estReg: Bayesian estimation in mixed nonlinear regression models

Description Usage Arguments Value Examples

Description

Bayesian estimation of the random effects φ_j in the mixed nonlinear regression model y_{ij}= f(φ_j, t_{ij}) + ε_{ij}, ε_{ij}~N(0,γ^2*s^2(t_{ij}), φ_j~N(μ, Ω) and the parameters μ, Ω, γ^2.

Usage

1
2
3
estReg(t, y, prior, start, fODE, sVar, ipred = 1, cut, len = 1000,
  Omega = "diag", mod = c("Gompertz", "logistic", "Weibull", "Richards",
  "Paris", "Paris2"), propPar = 0.02)

Arguments

t

vector of observation times

y

matrix of the M trajectories

prior

list of prior parameters - list(m, v, priorOmega, alpha, beta)

start

list of starting values

fODE

regression function

sVar

variance function

ipred

which of the M trajectories is the one to be predicted

cut

the index how many of the ipred-th series are used for estimation

len

number of iterations of the MCMC algorithm

Omega

structure of the variance matrix Omega of the random effects, diagonal matrix, otherwise inverse wishart distributed

mod

model out of Gompertz, Richards, logistic, Weibull, only used instead of fODE

propPar

proposal standard deviation of phi is |start$mu|*propPar

Value

phi

samples from posterior of φ

mu

samples from posterior of μ

Omega

samples from posterior of Ω

gamma2

samples from posterior of γ^2

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
mod <- "Gompertz"
fODE <- getFun("ODE", mod)
mu <- getPar("ODE", mod, "truePar")
n <- 5
parameters <- defaultPar(mu, n)
y <- drawData("ODE", fODE, parameters)
t <- parameters$t
prior <- getPrior(mu, parameters$gamma2)
start <- getStart(mu, n)
chains <- estReg(t, y, prior=prior, start=start, fODE=fODE)
plot(phi_ij(chains$phi, 1, 1), type="l")
plot(chains$gamma, type="l"); abline(h=parameters$gamma2, col=2)

SimoneHermann/hierRegSDE documentation built on May 9, 2019, 1:46 p.m.