README.md

mylogit

R-CMD-check codecov

This is a github repository for R package mylogit. It is used for course BIOSTATS625.

Introduction

mylogit used for fitting logistic regression model. Specifically, the response variable has two classes. There are two functions in this package:

Install

To install the package:

devtools::install_github("zwang0/mylogit", build_vignettes = T)

Usage

library(mylogit)
n <- nrow(ToothGrowth) # number of observations
data.train = ToothGrowth[1:floor(n*0.7), ] # training dataset
data.test = ToothGrowth[floor(n*0.7)+1:n, ] # testing dataset
myfit = mylogit(supp ~ len, data.train, "detailed") # fit logistic model
myfit.pred = mylogit.predict(myfit, data.test) # make prediction


zwang0/mylogit documentation built on Dec. 23, 2021, 10:13 p.m.