R/getSmo-18-6-13.R

Defines functions getSmo

Documented in getSmo

#-----------------------------------------------------------------------------------
getSmo <- function(object, what = c("mu", "sigma", "nu", "tau"),  parameter= NULL,  which=1)
{
  if (!is.gamlss(object)) stop("this is design for gamlss objects only")
  what <- if (!is.null(parameter))  {
    match.arg(parameter, choices=c("mu", "sigma", "nu", "tau"))} else  match.arg(what)               
  if (!what%in%object$par) stop(paste(what,"is not a parameter in the object","\n")) 
  #evalq(paste("object$",what,"[", which, "]",sep=""))
  AllSmo <- object[[paste(what,".coefSmo",sep="")]]
  Smo <- if (which==0) AllSmo else AllSmo[[which]]
  Smo
}

Try the gamlss package in your browser

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

gamlss documentation built on May 29, 2024, 6:08 a.m.