covaruber / sommer

38 stars 25 forks source link

Error in mmer(y = y, Z = ETA, method = "EMMA") : unused arguments (y = y, Z = ETA) #35

Closed genetistind closed 2 years ago

genetistind commented 2 years ago

HI Good Afternoon I am trying to reproduce the scenario1 of your SOMMERs package tutorial 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 data(wheatLines) X <- wheatLines$wheatGeno; X[1:5,1:5]; dim(X) Y <- wheatLines$wheatPheno dim(Y) rownames(X) <- rownames(Y) y <- Y[,1] # response grain yield y Z1 <- diag(length(y)) # incidence matrix K <- A.mat(X) # additive relationship matrix ETA <- list(add=list(Z=Z1, K=K)) ans <- mmer(y=y, Z=ETA, method="EMMA") # kinship based summary(ans)

after running this code i am getting error like even after declaration of y and ETA Error in mmer(y = y, Z = ETA, method = "EMMA") : unused arguments (y = y, Z = ETA)

Can you please help me where it went wrong and how to rectify it for my future work. Thanking you very much

covaruber commented 2 years ago

Please use the examples that come with the package. Please type:

?sommer

that will show you how to fit the model with that dataset. You're using very likely a very old version of sommer. Now sommer uses the formula-based approach.

Cheers, Eduardo