mixedRegression-class: S4 class of model informations for the hierarchical (mixed)...

Description Slots Examples

Description

Informations of model y_{ij} = f(φ_j, t_{ij}) + ε_{ij}, φ_j\sim N(μ, Ω), ε_{ij}\sim N(0,γ^2\widetilde{s}(t_{ij})).

Slots

phi

parameter φ

mu

parameter μ

Omega

parameter Ω

gamma2

parameter γ^2

fun

function f(φ, t)

sT.fun

function \widetilde{s}(t)

prior

list of prior parameters

start

list of starting values for the Metropolis within Gibbs sampler

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
mu <- c(2, 1); Omega <- c(1, 0.04)
phi <- sapply(1:2, function(i) rnorm(21, mu[i], sqrt(Omega[i])))
parameter <- list(phi = phi, mu = mu, Omega = Omega, gamma2 = 0.01)
fun <- function(phi, t) phi[1] + phi[2]*t
sT.fun <- function(t) t
prior <- list(m.mu = parameter$mu, v.mu = parameter$mu^2,
   alpha.omega = rep(3, length(parameter$mu)), beta.omega = parameter$Omega*2,
   alpha.gamma = 3, beta.gamma = parameter$gamma2*2)
start <- parameter
model <- set.to.class("mixedRegression", parameter, prior, start, fun = fun, sT.fun = sT.fun)

SimoneHermann/BaPreStoPro documentation built on May 10, 2017, 1:42 p.m.