| HFWM_est | R Documentation |
This function ignores spatial effects.
HFWM_est(Y, VAR, ENV, kin_info = FALSE, A = NULL, env_info = FALSE, Z = NULL, inits = NULL, hyper_para = NULL, M_iter = 5000, burn_in = 3000, thin = 5, save_chain = FALSE, seed = NULL)
Y |
A length-N numerical response vector |
VAR |
A length-N factor/character vector indicating the genotype information of Y |
ENV |
A length-N factor/character vector indicating the field information of Y |
kin_info |
A logical parameter controling if to use kinship matrix |
A |
kinship matrix, give value only if kin_info = TRUE |
env_info |
A logical parameter controling whether to use environmental covariates |
Z |
environmental covariates matrix with rownames = field names, give value only if env_info = TRUE |
inits |
initial values, default is given |
hyper_para |
hyper-parameter values, default is given |
M_iter |
Total iteration number |
burn_in |
Burn in number |
thin |
Thinning value |
save_chain |
A logical parameter controling whether to save MCMC chain: 'Chains.rds' in current working directory |
seed |
Random seed value |
Mean estimates and RMSE value
library(spFW) # load data data(spFW_example_data) Y <- spFW_example_data$yield VAR <- spFW_example_data$geno ENV <- spFW_example_data$loc COOR <- spFW_example_data[,c(4,5)] # run model fit0 <- HFWM_est(Y, VAR, ENV, M_iter = 1000, burn_in = 500, thin = 5) # plot estimated Y plot(Y, fit0$yhat)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.