Find Scale Parameter for modular regression
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)
rows from the tensor product design matrix
precision matrix1
precision matrix2
constraint matrix
threshold from eq. (8) in Klein & Kneib (2016)
probability parameter from eq. (8) in Klein & Kneib (2016)
sequence of weights for the anisotropy
prior probabilities for the weights
number of simulations
seed in case of simulation. default is 123.
possible sequence of thetas. default is NULL.
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
default is FALSE. If TRUE a low rank approximation is used for Z with k columns.
only used if lowrank=TRUE. specifies target rank of low rank approximation. Default is 5.
default is FALSE. only works im thetaseq is supplied. can parallel across thetaseq.
default is 1. number of cores is mc=TRUE
default is 1. If < 1 the lowrank approximation is based on on cumsum(values)/sum(values).
the optimal value for theta
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.