hyperpar_mod {sdPrior} | R Documentation |
Find Scale Parameter for modular regression
Description
Find Scale Parameter for modular regression
Usage
hyperpar_mod(Z, K1, K2, A, c = 0.1, alpha = 0.1, omegaseq, omegaprob,
R = 10000, myseed = 123, thetaseq = NULL, type = "IG",
lowrank = FALSE, k = 5, mc = FALSE, ncores = 1, truncate = 1)
Arguments
Z |
rows from the tensor product design matrix |
K1 |
precision matrix1 |
K2 |
precision matrix2 |
A |
constraint matrix |
c |
threshold from eq. (8) in Klein & Kneib (2016) |
alpha |
probability parameter from eq. (8) in Klein & Kneib (2016) |
omegaseq |
sequence of weights for the anisotropy |
omegaprob |
prior probabilities for the weights |
R |
number of simulations |
myseed |
seed in case of simulation. default is 123. |
thetaseq |
possible sequence of thetas. default is NULL. |
type |
type of hyperprior for tau/tau^2; options: IG => IG(1,theta) for tau^2, SD => WE(0.5,theta) for tau^2, HN => HN(0,theta) for tau, U => U(0,theta) for tau, HC => HC(0,theta) for tau |
lowrank |
default is FALSE. If TRUE a low rank approximation is used for Z with k columns. |
k |
only used if lowrank=TRUE. specifies target rank of low rank approximation. Default is 5. |
mc |
default is FALSE. only works im thetaseq is supplied. can parallel across thetaseq. |
ncores |
default is 1. number of cores is mc=TRUE |
truncate |
default is 1. If < 1 the lowrank approximation is based on on cumsum(values)/sum(values). |
Value
the optimal value for theta
Author(s)
Nadja Klein
References
Kneib, T., Klein, N., Lang, S. and Umlauf, N. (2017) Modular Regression - A Lego System for Building Structured Additive Distributional Regression Models with Tensor Product Interactions Working Paper.