delete mega_trait because it equals adding constraint on variances
move constraint argument in runMCMC() to build_model(). This is to put all residual variance related argument together.
add variance structural, and modify related code. add printed info if constraint; add error if constraint in ST
mutable struct Variance
val::Union{AbstractFloat, AbstractArray, Bool} #value of the variance, e.g., single-trait: 1.5, two-trait: [1.3 0.4; 0.4 0.8]
df::Union{AbstractFloat,Bool} #degrees of freedom, e.g., 4.0
scale::Union{AbstractFloat, AbstractArray, Bool} #scale, e.g., single-trait: 1.0, two-trait: [1.0 0; 0 1.0]
estimate_variance::Bool #estimate_variance=true means estimate variance at each MCMC iteration
estimate_scale::Bool #estimate_scale=true means estimate scale at each MCMC iteration
constraint::Bool #constraint=true means in multi-trait analysis, covariance is zero
end
make scale in MT be a diagonal matrix everywhere
organize arguments in build_model(), get_genotypes(), set_random ()
relocate some comments in NNMM
relocate initialization of scale_R, df_R to build_model()
add R_constraint!() and G_constraint!() functions to change scale and df if constraint
wiki page: https://github.com/reworkhow/JWAS.jl/wiki/Constraint-on-variance-components
estimateScale
toestimate_scale
;mega_trait
because it equals adding constraint on variancesconstraint
argument inrunMCMC()
tobuild_model()
. This is to put all residual variance related argument together.add variance structural, and modify related code. add printed info if constraint; add error if constraint in ST
build_model()
,get_genotypes()
,set_random ()
build_model()
R_constraint!()
andG_constraint!()
functions to change scale and df if constraint