R/tTestGLM.R

Defines functions tTestGLM

# T Test based on Generalized Linear Model Fit
# Author: Xu Qiao
# Created: 22nd, Sep, 2017
# Last Modifed: 5th, Dec, 2017
#'@importFrom stats glm gaussian
tTestGLM <- function(simdata, formula=data ~ group) {
  GLMfit <- glm(data=simdata, formula=formula, family=gaussian(link="log"))
  statistics <- summary(GLMfit)$coefficients[2, "t value"]
  abs(statistics)
}

Try the PowerExplorer package in your browser

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

PowerExplorer documentation built on April 28, 2020, 9:03 p.m.