Package 'SPreg'

Title: Bias Reduction in the Skew-Probit Model for a Binary Response
Description: Provides a function for the estimation of parameters in a binary regression with the skew-probit link function. Naive MLE, Jeffrey type of prior and Cauchy prior type of penalization are implemented, as described in DongHyuk Lee and Samiran Sinha (2019+) <doi:10.1080/00949655.2019.1590579>.
Authors: DongHyuk Lee, Samiran Sinha
Maintainer: DongHyuk Lee <[email protected]>
License: GPL-3
Version: 1.0
Built: 2024-11-03 06:27:22 UTC
Source: CRAN

Help Index


Fitting Binary Regression with a Skew-Probit Link Function

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

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

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)

Fitting Binary Regression with a Skew-Probit Link Function

Description

It is the default fitting method for skewProbit.

Usage

skewProbit.fit(y, x, penalty = "Jeffrey", initial = NULL, 
	cvtCov = TRUE, delta0 = 3, level = 0.95)

Arguments

y

a design matrix of dimension n*p

x

a vector of response of length n

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.

Value

A list cotaining the following components:

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

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)

x <- cbind(1, x1, x2)
## Not run: 
mod1 <- skewProbit.fit(y, x, penalty = "Jeffrey", cvtCov = FALSE)
mod2 <- skewProbit.fit(y, x, penalty = "Naive", cvtCov = FALSE)
mod3 <- skewProbit.fit(y, x, penalty = "Cauchy", cvtCov = FALSE)
mod1$coef
mod2$coef
mod3$coef


## End(Not run)