Description Usage Arguments Value Examples
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.
1 2 3 |
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 |
phi |
samples from posterior of φ |
mu |
samples from posterior of μ |
Omega |
samples from posterior of Ω |
gamma2 |
samples from posterior of γ^2 |
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.