tests/logitmfx-test.R

library('mfx')

### Name: logitmfx
### Title: Marginal effects for a logit regression.
### Aliases: logitmfx print.logitmfx

### ** Examples

# simulate some data
set.seed(12345)
n = 1000
x = rnorm(n)

# binary outcome
y = ifelse(pnorm(1 + 0.5*x + rnorm(n))>0.5, 1, 0)

data = data.frame(y,x)
logitmfx(formula=y~x, data=data)

Try the mfx package in your browser

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

mfx documentation built on May 2, 2019, 12:46 p.m.