Learn R Programming

frm (version 1.2.2)

frm.ptest: P Test for Fractional Regression Models

Description

frm.ptest is used to test the specification of alternative non-nested fractional regression models.

Usage

frm.ptest(object1, object2, version = "Wald", table = T)

Arguments

object1
an object containing the results of an frm command.
object2
an object containing the results of another frm command.
version
a vector containing the test versions to use. Available options: Wald (the default) and LM. Both options may be chosen at the same time and are computed in a robust way.
table
a logical value indicating whether a summary table with the test results should be printed.

Value

frm.reset returns a named vector with the test results.

Details

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.

References

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.

See Also

frm, for fitting fractional regression models. frm.reset and frm.ggoff, for specification tests. frm.pe, for computing partial effects.

Examples

Run this code
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.

Run the code above in your browser using DataLab