R/Glog.R

Defines functions glog

Documented in glog

#' Glog transformation for linear models
#'
#' The function transforms the dependent variable of a linear model using the 
#' Glog transformation. 
#'
#' @param object an object of type lm. 
#' @return An object of class \code{trafo}. Methods such as 
#' \code{\link{as.data.frame.trafo}} and \code{\link{print.trafo}} can 
#' be used for this class.    
#' @references 
#' Durbin BP, Hardin JS, Hawkins DM, Rocke DM (2002). A Variance-stabilizing 
#' Transformation for Gene-expression Microarray Data. Bioinformatics, 18, 
#' 105-110.
#' @examples
#' # Load data
#' data("cars", package = "datasets")
#' 
#' # Fit linear model
#' lm_cars <- lm(dist ~ speed, data = cars)
#' 
#' # Transform dependent variable 
#' glog(object = lm_cars)
#' @export

glog <- function(object) {
  
  trafo <- "glog"
  woparam(object = object, trafo = trafo)
}

Try the trafo package in your browser

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

trafo documentation built on May 2, 2019, 2:13 p.m.