myLogistic: Logistic Regression Fitting

Description Usage Arguments Value Examples

View source: R/myLogistic.R

Description

This function performs the logistic regression of Y on X and returns the coeffients. No intercept term is assumed

Usage

1
myLogistic(X, Y)

Arguments

X

an n x p matrix of explanatory variables

Y

an n dimensional vector of binary responses

Value

A list of the logistic betas and their respective standard errors

Examples

1
2
3
4
5
6
7
8
set.seed(18274)
n <- 500
p <- 4
X    <- matrix(rnorm(n * p), nrow = n)
beta <- c(12, -2,-3, 4)
Y    <- 1 * (runif(n) <  1 / (1 + exp(-(X %*% beta))))
logistic_beta <- myLogistic(X, Y)
logistic_beta

stacyste/RegressionPkg documentation built on Nov. 24, 2019, 5:12 p.m.