Compare two link functions for the binomial distribution

Description

Compare two link functions for the binomial distribution.

Usage

1
2
comparebinlinks(d1, d2, a = -8, b = 8, n = 2001, prob1 = NULL,
  plot = TRUE)

Arguments

d1

Either a positive number of one of "logit" or "probit" defining the link function. If positive number, this corresponds to the robit(d1) link.

d2

Same as d1.

a

Beginning of range of points to evaluate (and plot) the two link functions.

b

End of range of points to evaluate (and plot) the two link functions.

n

Number of points for evaluating (and plot) the two link functions.

prob1

Binomial probabilities corresponding to the first link function.

plot

Whether the two link functions should be plotted. If so, two plots are created: the left plot shows two curves corresponding to the two link functions (black is the first) and the right plot shows their difference (first - second).

Details

Finds the closest (after suitable scaling) of the link function d2 to d1. If prob1 is provided, then this corresponds to probabilities under link d1 and the probabilities are transformed to d2. Also creates a plot of the two link functions.

Value

A list with the following elements

Examples

1
2
3
4
5
## Not run: 
comparebinlinks("logit", 7) # The robit(7) approximates logit
comparebinlinks("probit", 1, prob1 = c(.5, .6, .7, .8, .9))

## End(Not run)

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

All documentation is copyright its authors; we didn't write any of that.