epsi.GG.HF {biology}R Documentation

~~function to do ... ~~

Description

~~ A concise (1-5 lines) description of what the function does. ~~

Usage

epsi.GG.HF(object)

Arguments

object ~~Describe object here~~

Details

~~ If necessary, more details than the description above ~~

Value

~Describe the value returned If it is a LIST, use

comp1 Description of 'comp1'
comp2 Description of 'comp2'

...

Warning

....

Note

~~further notes~~

~Make other sections like Warning with section{Warning }{....} ~

Author(s)

~~who you are~~

References

~put references to the literature/web site here ~

See Also

~~objects to See Also as help, ~~~

Examples

##---- Should be DIRECTLY executable !! ----
##-- ==>  Define data, use random,
##--    or do  help(data=index)  for the standard data sets.

## The function is currently defined as
function (object) 
{
    require(car)
    gg.hf <- NULL
    call <- attr(object, "call")
    block <- names(object)[2]
    resp <- as.character(call[[2]][[2]])
    rept <- row.names(summary(object[[3]])[[1]])
    rept_lab <- trim.blanks(rept[-grep("Residuals", rept)])
    rept <- trim.blanks(rept[-grep(":|Residuals", rept)])
    rept <- sub("C\(([A-Za-z_\.]*).*\)", "\1", rept)
    data <- eval(call[[3]])
    between <- row.names(summary(object[[2]])[[1]])
    between_lab <- trim.blanks(between[-grep("Residuals", between)])
    between <- trim.blanks(between[-grep(":|Residuals", between)])
    data.rm <- reshape(data, direction = "wide", timevar = rept, 
        idvar = block, v.names = resp)
    if (length(between_lab) == 0) {
        data.manova <- lm(as.matrix(data.rm[grep(resp, colnames(data.rm))]) ~ 
            1)
    }
    else {
        between <- eval(parse(text = paste("data.rm$", between, 
            sep = "")))
        data.manova <- lm(as.matrix(data.rm[grep(resp, colnames(data.rm))]) ~ 
            between)
    }
    idata <- data.frame(within = as.factor(levels(eval(parse(text = paste(as.character(call[[3]]), 
        "$", rept, sep = ""))))))
    data.ok <- Anova(data.manova, idata = idata, idesign = ~within, 
        type = "III")
    gg.hf <- GGHF(data.ok)
    colnames(gg.hf) <- c("Greenhouse-Geisser", "Hunyh-Feldt")
    rownames(gg.hf) <- c(between_lab, rept_lab)
    cat("Epsilon values\n")
    gg.hf
  }

[Package biology version 1.0 Index]