R/plot.MCMCglmm.R

"plot.MCMCglmm"<-function(x, random=FALSE, ...){

  nF<-x$Fixed$nfl
  devAskNewPage.orig<-devAskNewPage()
  if(random){
    nF<-sum(rep(x$Random$nrl, x$Random$nfl))+nF
    if(nF!=dim(x$Sol)[2]){stop("random effects not saved and cannot be plotted")}    
  }

  plot(x$Sol[,1:nF, drop=FALSE], ...)
  devAskNewPage(TRUE)
  if(!is.null(x$Lambda)){
    plot(x$Lambda, ...)
    devAskNewPage(TRUE)
  }
  if(!is.null(x$ThetaS)){
    plot(x$ThetaS, ...)
    devAskNewPage(TRUE)
  }
  plot(x$VCV, ...)
  devAskNewPage(devAskNewPage.orig)
}

Try the MCMCglmm package in your browser

Any scripts or data that you put into this service are public.

MCMCglmm documentation built on July 9, 2023, 5:24 p.m.