Description Usage Arguments Details Value Author(s) References See Also Examples
frm.ptest
is used to test the specification of alternative non-nested fractional regression models.
1 |
object1 |
an object containing the results of an |
object2 |
an object containing the results of another |
version |
a vector containing the test versions to use. Available options: |
table |
a logical value indicating whether a summary table with the test results should be printed. |
frm.ptest
applies the P test statistic proposed by Davidson and
MacKinnon (1981) to fractional regression models estimated via
frm
. frm.ptest
may be used to test against each other two alternative
specifications for the link function in: (i) one-part fractional regression models;
(ii) the binary component of two-part fractional regression models; (iii) the
fractional component of two-part fractional regression models; and (iv) two-part
fractional regression models. In addition, frm.ptest
may be used to test
one-part models against two-part models and in cases where the link functions are the
same but the regressors are non-nested. See Ramalho, Ramalho and Murteira (2011)
for details on the application of the P test in the fractional regression framework.
frm.reset
returns a named vector with the test results.
Joaquim J.S. Ramalho <jsr@uevora.pt>
Davidson, R. and J.G. MacKinnon (1981), "Several tests for model specification on the presence of alternative hypotheses", Econometrica, 49(3), 781-793.
Ramalho, E.A., J.J.S. Ramalho and J.M.R. Murteira (2011), "Alternative estimating and testing empirical strategies for fractional regression models", Journal of Economic Surveys, 25(1), 19-68.
frm
, for fitting fractional regression models.
frm.reset
and frm.ggoff
, for specification tests.
frm.pe
, for computing partial effects.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | N <- 250
u <- rnorm(N)
X <- cbind(rnorm(N),rnorm(N))
dimnames(X)[[2]] <- c("X1","X2")
ym <- exp(X[,1]+X[,2]+u)/(1+exp(X[,1]+X[,2]+u))
y <- rbeta(N,ym*20,20*(1-ym))
y[y > 0.9] <- 1
#Testing logit versus loglog specifications for standard fractional
#regression models using a LM version of the P test
res1 <- frm(y,X,linkfrac="logit",table=FALSE)
res2 <- frm(y,X,linkfrac="loglog",table=FALSE)
frm.ptest(res1,res2,"LM")
#Testing a logit one-part fractional regression model versus a binary logit +
#fractional probit two-part model using a Wald version of the P test
res1 <- frm(y,X,linkfrac="logit",table=FALSE)
res2 <- frm(y,X,linkbin="logit",linkfrac="probit",type="2P",inf=1,table=FALSE)
frm.ptest(res1,res2,"Wald")
## See the website http://evunix.uevora.pt/~jsr/FRM.htm.
|
*** P test ***
H0: Fractional logit model
H1: Fractional loglog model
Version Statistic p-value
LM 1.406 0.236
H0: Fractional loglog model
H1: Fractional logit model
Version Statistic p-value
LM 2.744 0.098 *
*** P test ***
H0: Fractional logit model
H1: Binary logit + Fractional probit two-part model
Version Statistic p-value
Wald 1.876 0.062 *
H0: Binary logit + Fractional probit two-part model
H1: Fractional logit model
Version Statistic p-value
Wald 12.223 0.000 ***
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.