fModelOutput: Report parameters from regression models

Description Usage Arguments Details Author(s) See Also Examples

View source: R/fModelOutput.R

Description

fModelOutput display corresponding estimates of different models along with 95

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
fModelOutput(model, rnd = 1, print.table = TRUE)

## Default S3 method:
fModelOutput(...)

## S3 method for class 'unAdjusted'
fModelOutput(model, rnd = 1, print.table = TRUE)

## S3 method for class 'adjusted'
fModelOutput(model, rnd = 1, print.table = TRUE)

Arguments

model

object glm or lm type

rnd

rounding digits

print.table

logical value to display formatted outputs

...

optional arguments

Details

fModelOutput

reports parameters from regression models. Currently supporting model is logistic models. Other types will be incoporated in future works.

In unadjusted analysis, it reports unajdusted odds ratios, 95 interval and Wald's p-value.

In adjusted analysis, both unadjusted and adjusted parameters are reported.

The reports are in well-formatted texts which can be readily copied into spreadsheet programs or format in word file.

Please be reminded:

This is an ongoing work. In case of comments or suggestions, please contact me at dr.myominnoo@gmail.com.

Reference:

  1. LOGIT REGRESSION | R DATA ANALYSIS EXAMPLES. UCLA: Statistical Consulting Group. from https://stats.idre.ucla.edu/r/dae/logit-regression/ (accessed September 27, 2019)

Author(s)

Myo Minn Oo (Email: dr.myominnoo@gmail.com | Website: https://myominnoo.github.io/)

See Also

testModelFit

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
## Not run: 
## example from IRDE website:
## https://stats.idre.ucla.edu/r/dae/logit-regression/
mydata <- read.csv("https://stats.idre.ucla.edu/stat/data/binary.csv")
codebook(mydata)
tab(admit, mydata)
tab(rank, mydata)

logit.gre <- glm(admit ~ gre, data = mydata, family = "binomial")
summary(logit.gre)
fModelOutput(logit.gre)
testModelFit(logit.gre)

logit.multi <- glm(admit ~ gre + gpa + factor(rank), data = mydata, family = "binomial")
summary(logit.multi)

fModelOutput(logit.multi) # generates parameters
testModelFit(logit.multi) # test overall significant of the model

## End(Not run)

myominnoo/mStats_beta documentation built on Feb. 29, 2020, 8:17 a.m.