skewProbit: Fitting Binary Regression with a Skew-Probit Link Function

Description Usage Arguments Details Value Author(s) References Examples

View source: R/SkewProbit_source_1.0.R

Description

This function fits a binary regression with a skew-probit link function. Naive MLE, Jeffrey's prior and Cauchy prior type of penalization are implemented to find estimates.

Usage

1
2
skewProbit(formula, data = list(), penalty = "Jeffrey", initial = NULL, 
	cvtCov = TRUE, delta0 = 3, level = 0.95)

Arguments

formula

an object of class "formula" as in lm, glm

data

an optional data frame, list or environment containing the variables in the model as in lm, glm

penalty

type of penalty function. Default option is "Jeffrey". "Cauchy" will give estimates with Cauchy prior penaly function. "Naive" will give ML estimates.

initial

a logical value. If specified, it will be used for the initial value of numerical optimization.

cvtCov

a logical value. If it is true, then all numerical values will be standardized to have mean zero and unit standard deviation.

delta0

an initial guess of skewness parameter.

level

a confidence level. Default value is 0.95.

Details

This function uses ucminf package for optimization. Also package sn is necessary. A detailed disscussion can be found in the reference below.

Value

An object of class skewProbit is returned with

coefficients

A named vector of coefficients

stderr

Standard errors of coefficients

zscore

Z-scores of coefficients

pval

p-values of coefficients

lower

Lower limits of confidence intervals

upper

Upper limits of confidence intervals

Author(s)

DongHyuk Lee, Samiran Sinha

References

Identifiability and bias reduction in the skew-probit model for a binary response. To appear in Journal of Statistical Computation and Simulation.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
library(sn)
library(ucminf)

n <- 500
b0 <- 0.34
delta <- 4
b1 <- 1
b2 <- -0.7

set.seed(1234)
x1 <- runif(n, -2, 2)
x2 <- rnorm(n, sd = sqrt(4/3))
eta <- as.numeric(b0 + b1*x1 + b2*x2)
p <- psn(eta, alpha = delta)
y <- rbinom(n, 1, p)

## Not run: 
dat <- data.frame(y, x1 = x1, x2 = x2)
mod1 <- skewProbit(y ~ x1 + x2, data = dat, penalty = "Jeffrey", cvtCov = FALSE, level = 0.95)
mod2 <- skewProbit(y ~ x1 + x2, data = dat, penalty = "Naive", cvtCov = FALSE, level = 0.95)
mod3 <- skewProbit(y ~ x1 + x2, data = dat, penalty = "Cauchy", cvtCov = FALSE, level = 0.95)
summary(mod1)
summary(mod2)
summary(mod3)

## End(Not run)

SPreg documentation built on May 1, 2019, 8:50 p.m.

Related to skewProbit in SPreg...