Good Afternoon I am trying to reproduce the scenario1 of your SOMMERs package tutorial in R version 4.1.2 before applying to my data to Case1:Genotypic and phenotypic data for the parents is available and we want to predict performance of the possible crosses assuming a purely additive model (species with no heterosis) with below code
library(sommer)
data(wheatLines)
write.table(wheatLines,"wheatlinesgsdata.csv")
X <- wheatLines$wheatGeno;
X[1:5,1:5];
dim(X)
Y <- wheatLines$wheatPheno
dim(Y)
rownames(X) <- rownames(Y)
#### select environment 1 and create incidence and additive #### relationship matrices
y <- Y[,1] # response grain yield
Z1 <- diag(length(y)) # incidence matrix
K <- A.mat(X) # additive relationship matrix
#### perform the GBLUP pedigree-based approach by ### specifying your random effects (ETA) in a 2-level list ### structure and run it using the mmer function
ETA <- list(add=list(Z=Z1, K=K))
ans <- mmer(y=y, Z=ETA, method="EMMA") # kinship based
names(ans)
summary(ans)
[/CODE]
after running above code i am getting error like in my question even after declaration of y and ETA
**Error in mmer(y = y, Z = ETA, method = "EMMA") : unused arguments (y = y, Z = ETA)**
Can anyone please help me where it went wrong and how to rectify it for my future work.
Thanking you very much
Aucun commentaire:
Enregistrer un commentaire