gaze {autoReg}R Documentation

Produce table for descriptive statistics

Description

Produce table for descriptive statistics by groups for several variables easily. Depending on the nature of these variables, different descriptive statistical methods were used(t-test, ANOVA, Kruskal-Wallis, chi-squared, Fisher's,...)

Usage

gaze(x, ...)

## S3 method for class 'formula'
gaze(x, ...)

## S3 method for class 'data.frame'
gaze(x, ...)

## S3 method for class 'coxph'
gaze(x, ...)

## S3 method for class 'survreg'
gaze(x, ...)

## S3 method for class 'glm'
gaze(x, ...)

## S3 method for class 'lm'
gaze(x, ...)

## S3 method for class 'tidycrr'
gaze(x, ...)

Arguments

x

An R object, formula or data.frame

...

arguments to be passed to gaze.data.frame or gaze.formula

Value

An object of class "gaze" which inherits from the class "data.frame" with at least the following attributes:

attr(*,"yvars)

character. name of dependent variable

Methods (by class)

Examples

library(moonBook)
library(dplyr)
gaze(acs)
gaze(~age+sex,data=acs)
gaze(sex~.,data=acs,digits=1,method=1,show.p=TRUE) %>% myft()

gaze(sex~age+Dx,data=acs)
gaze(EF~.,data=acs) %>% myft()
gaze(sex+Dx~.,data=acs,show.p=TRUE) %>% myft()
gaze(sex+Dx~.,data=acs)
gaze(Dx+sex~cardiogenicShock,data=acs,show.p=TRUE) %>% myft()
gaze(Dx+sex+HBP~cardiogenicShock,data=acs,show.p=TRUE)
gaze(~mpg+cyl,data=mtcars)
gaze(~.,data=mtcars)
gaze(cyl~.,data=mtcars,show.p=TRUE)
gaze(hp~.,data=mtcars)
gaze(cyl+am~.,data=mtcars)

library(survival)
x=coxph(Surv(time,status) ~rx,data=anderson1)
gaze(x)
x=coxph(Surv(time,status) ~rx*logWBC,data=anderson1)
gaze(x)
library(survival)
x=survreg(Surv(time, status) ~ rx, data=anderson,dist="exponential")
gaze(x)
x=survreg(Surv(time, status) ~ ph.ecog + age + sex, lung)
gaze(x)
data(cancer,package="survival")
fit=glm(status~rx+sex+age+obstruct+nodes,data=colon,family="binomial")
gaze(fit)
fit=lm(mpg~wt*hp+am+I(wt^2),data=mtcars)
gaze(fit)
data(melanoma,package="boot")
melanoma$status_crr=ifelse(melanoma$status==1,1,ifelse(melanoma$status==2,0,2))
fit=crrFormula(time+status_crr~age+sex+thickness+ulcer,data=melanoma)
gaze(fit)

[Package autoReg version 0.3.3 Index]