Description Usage Arguments Value
View source: R/preferentialSampling.R
preferentialSampling
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 | preferentialSampling(
data,
d,
n.sample,
burnin,
L_w,
L_ca,
L_co,
L_a_ca,
L_a_co,
proposal.sd.theta = 0.3,
m_aca = 2000,
m_aco = 2000,
m_ca = 700,
m_co = 700,
m_w = 700,
target_aca = 0.75,
target_aco = 0.75,
target_ca = 0.75,
target_co = 0.75,
target_w = 0.75,
target_loc = 0.75,
self_tune_w = TRUE,
self_tune_aca = TRUE,
self_tune_aco = TRUE,
self_tune_ca = TRUE,
self_tune_co = TRUE,
self_tune_loc = TRUE,
delta_w = NULL,
delta_aca = NULL,
delta_aco = NULL,
delta_ca = NULL,
delta_co = NULL,
delta_loc = NULL,
beta_ca_initial = NULL,
beta_co_initial = NULL,
alpha_ca_initial = NULL,
alpha_co_initial = NULL,
beta_loc_initial = NULL,
theta_initial = NULL,
phi_initial = NULL,
w_initial = NULL,
prior_phi,
prior_theta,
prior_alpha_ca_var,
prior_alpha_co_var
)
|
data |
List. Data input containing case, control counts, covariates. |
d |
Matrix. Distance matrix for grid cells in study region. |
n.sample |
Numeric. Number of MCMC samples to generate. |
burnin |
Numeric. Number of MCMC samples to discard as burnin. |
L_w |
Numeric. HMC simulation length parameter for spatial random effects. |
L_ca |
Numeric. HMC simulation length parameter for case covariates. |
L_co |
Numeric. HMC simulation length parameter for control covariates. |
L_a_ca |
Numeric. HMC simulation length parameter for case preferential sampling parameter. |
L_a_co |
Numeric. HMC simulation length parameter for control preferential sampling parameter. |
proposal.sd.theta |
Numeric. Standard deviation of proposal distribution for spatial range parameter. |
m_aca |
Numeric. Number of samples to apply self tuning for case preferential sampling parameter. |
m_aco |
Numeric. Number of samples to apply self tuning for control preferential sampling parameter. |
m_ca |
Numeric. Number of samples to apply self tuning for case covariates. |
m_co |
Numeric. Number of samples to apply self tuning for control covariates. |
m_w |
Numeric. Number of samples to apply self tuning for spatial random effects. |
target_aca |
Numeric. Target acceptance rate for case preferential sampling parameter. |
target_aco |
Numeric. Target acceptance rate for control preferential sampling parameter. |
target_ca |
Numeric. Target acceptance rate for case covariates. |
target_co |
Numeric. Target acceptance rate for control covariates. |
target_w |
Numeric. Target acceptance rate for spatial random effects. |
target_loc |
Numeric. Target acceptance rate for locational covariates. |
self_tune_w |
Logical. Whether to apply self tuning for spatial random effects. |
self_tune_aca |
Logical. Whether to apply self tuning for case preferential sampling paramter. |
self_tune_aco |
Logical. Whether to apply self tuning for control preferential sampling paramter. |
self_tune_ca |
Logical. Whether to apply self tuning for case covariates. |
self_tune_co |
Logical. Whether to apply self tuning for control covariates. |
self_tune_loc |
Logical. Whether to apply self tuning for locational covariates. |
delta_w |
Numeric. Required if self_tune_w is FALSE. HMC step size for spatial random effects. |
delta_aca |
Numeric. Required if self_tune_w is FALSE. HMC step size for case preferential sampling parameter. |
delta_aco |
Numeric. Required if self_tune_w is FALSE. HMC step size for control preferential sampling parameter. |
delta_ca |
Numeric. Required if self_tune_w is FALSE. HMC step size for case covariates. |
delta_co |
Numeric. Required if self_tune_w is FALSE. HMC step size for control covariates. |
delta_loc |
Numeric. Required if self_tune_w is FALSE. HMC step size for locational covariates. |
beta_ca_initial |
Numeric. Initial MCMC value for case covariate parameter. |
beta_co_initial |
Numeric. Initial MCMC value for control covariate parameter. |
alpha_ca_initial |
Numeric. Initial MCMC value for case preferential sampling parameter. |
alpha_co_initial |
Numeric. Initial MCMC value for control preferential sampling parameter. |
beta_loc_initial |
Numeric. Initial MCMC value for locational covariate parameter. |
theta_initial |
Numeric. Initial MCMC value for spatial range parameter. |
phi_initial |
Numeric. Initial MCMC value for spatial marginal variance parameter. |
w_initial |
Numeric. Initial MCMC value for spatial random effects. |
prior_phi |
List. Shape and scale values for prior distribution (Inverse Gamma) of marginal variance. |
prior_theta |
List. Shape and scale values for prior distribution (Gamma) of spatial range. |
prior_alpha_ca_var |
List. Prior (Independent Normal) variance of case covariates. |
prior_alpha_co_var |
List. Prior (Independent Normal) variance of control covariates. |
List containing posterior samples and associated tuning values.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.