Rcov=~ vs(units, Gt=ans.m$sigma_scaled$units, Gtc=fixm(2)), But the (normal-based) ML estimator would divide the elements by N. The reasoning is the following: the elements in a sample variance-covariance matrix have (usually) been divided by N-1. It fits a range of variance-covariance models (identity, compound symmetry (cs), diagonal, simple correlation with heterogeneous variance (outside. This function selects the best covariance structure for genetic correlations between trials. + vs(Rowf,Gt=ans.m$sigma_scaled$Rowf, Gtc=fixm(2)) If the estimator is ML (the default), then the sample variance-covariance matrix will be rescaled by a factor (N-1)/N. Selects the best variance-covariance model for a set of trials. Random=~ vs(id, Gu=A, Gt=ans.m$sigma_scaled$id,Gtc=fixm(2)) X (n x r) design matrix for fixed effects (r x 1) vector of fixed effects Z (n x t) design matrix for random effects g (t x 1) vector of random effects e (n x 1) vector of random errors G (t x t) matrix of variance-covariance of random effects R (n x n) matrix of variance-covariance of random errors 0 0 e g. Var(X) is the 2x2 identity matrix because the diagonals are Var(x1) & Var(x2) 1, the others are 0 because x1, x2 are.
It is just like the univariate case: Var(AX) A 2 Var(X) but in matrix form. I am not sure if you are allowed to use the property: Var(AX) A Var(X) A T. Note that the numbers here relate to position in the 2x2 covariance matrix we specied with. # create the variance-covariance matrix for id levelsġ: estimated and constrained to be positiveģ: fixed variance-covariance component provided in GtĪfter that is easy to see that if you want to force certain variance components you have to provide initial values (Gt argument) and specify a constraint matrix with values 3's (the function fixm() can creates such matrix). 'A' is a matrix, you cannot do things like 'A(X1,X2) (AX1,AX2)'. If you have sommer >= 3.7 forcing specific variance or covariance components can be done using the Gt (initial values) and Gtc (contraints) arguments from the vs() function that is used to specify the variance model for a random effect.įor example assume you fit the following multivariate mixed model for two traits: library(sommer)