Comments (2)
Hello Julia, indeed now fitted only provide y=Xb different than before. Currently the best way to obtain the fitted values using all the random effects (Xb+Zu) is to use the predict() function available in sommer. See for example:
data(DT_cornhybrids)
DT_cornhybrids <- DT
hybrid2 <- DT # extract cross data
A <- GT
K1 <- A[levels(hybrid2$GCA1), levels(hybrid2$GCA1)]; dim(K1)
K2 <- A[levels(hybrid2$GCA2), levels(hybrid2$GCA2)]; dim(K2)
S <- kronecker(K1, K2) ; dim(S)
rownames(S) <- colnames(S) <- levels(hybrid2$SCA)
ans <- mmer(Yield ~ Location,
random = ~ vs(GCA1,Gu=K1) + vs(GCA2,Gu=K2) + vs(SCA,Gu=S),
rcov=~units,
data=hybrid2)
pp <- predict(ans)
head(pp$fitted) # has all fixed and random effects added
I hope this helps. Cheers!
from sommer.
Thank you, will do.
from sommer.
Related Issues (20)
- Pin function no longer available? HOT 1
- Consider adding revision/version tags to repo. HOT 1
- scores in result of GWAS is incomplete HOT 2
- bug in vpredict HOT 1
- GL(M)M's as a future target? HOT 4
- more structure covariance structures? HOT 2
- Query regarding MEMMA output HOT 1
- Error in mmer(y = y, Z = ETA, method = "EMMA") : unused arguments (y = y, Z = ETA) HOT 1
- Suppress "fixed-effect model matrix is rank deficient so dropping 1 columns / coefficients" HOT 2
- Error in `contrasts<-`(`*tmp*`, value = contr.funs[1 + isOF[nn]]) : contrasts can be applied only to factors with 2 or more levels HOT 2
- predict function when spl2D is used HOT 4
- predict() error in cross-validation HOT 6
- Facing error at the stage of A.mat HOT 3
- Can't get mmec to run HOT 4
- mmec using weights (W) HOT 5
- mmer fails when number of observations > 2^15 HOT 4
- Poisson and Negative Bionomial Distributed Traits HOT 2
- how to add permanent environmental effect in random regression model ? HOT 1
- Throw error for singular system HOT 6
- GWAS entries in CHANGELOG and documentation HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sommer.