Trend of probability values in a binary choice model
This function computes the change of probability for a continuous variable based on a binary choice model (either probit or logit), and furthermore, stratifies the probability through a binary independant variable.
maTrend(q, n = 300, nam.c, nam.d, simu.c = TRUE)
q |
a object of class of "maBina" estimated from |
n |
number of points for calculating probability; the large the number, the smoother the curve. |
nam.c |
a name of a continuous indepedent variable; this must be given for the function to work. |
nam.d |
an optional name of a binary independent variable; this is used to stratify the probability. |
simu.c |
Whether simulation data for the continuous variable of |
For a continous variable, its probability values can be computed on the basis of a binary probit or logit model. The trend can be stratified by a binary independent variable. In addition, the standard errors of each probability series are also computed using delta method.
Return a list object of class "maTrend" with the following components:
q |
a list object of class "maBina" |
nam.c |
the name of a continous variable |
mm |
matrix of independant variables for all |
trend |
if |
nam.d |
if |
m1 |
if |
m0 |
if |
trend1 |
if |
trend0 |
if |
Two methods are defined as follows:
print
:print the probability output.
plot
:Plot the probability values for a continuous variable. If a strata is specified through nam.d
in maTrend()
, then the stratified values also are shown.
Changyou Sun (cs258@.msstate.edu)
Greene, W.H. 2003. Econometric Analysis (5th ed.). Prentice Hall, New York. 1026 P.
data(daPe) ma <- glm(grade ~ gpa + tuce + psi, x = TRUE, data = daPe, family = binomial(link = "probit")) summary(ma) (ea <- maBina(w = ma, x.mean = TRUE, rev.dum = TRUE)) (ta <- maTrend(q = ea, nam.c = "gpa", simu.c = FALSE)) (tb <- maTrend(q = ea, nam.c = "gpa", nam.d= "psi", simu.c = TRUE, n=100)) plot(ta) plot(tb)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.