0
$\begingroup$

I estimate probit model: \begin{align*} P(y=1|x_1, x_2, x_3) = \Phi(\alpha_0 + \alpha_1 x_1 + \alpha_2 x_2+ \alpha_3 x_3) \end{align*} using: probitMain <- glm(y~x1+x2+x3, family=binomial(link="probit"), data=MD).
I want to test nonlinear hypothesis $f(\alpha_0, \alpha_1, \alpha_2, \alpha_3) = 0$, where $f$ is a rational function $f(\alpha_0,\alpha_1, \alpha_2, \alpha_3) = \frac{\alpha_2 + \alpha_0 \frac{\alpha_3}{\alpha_1}}{1+\frac{\alpha_3}{\alpha_1}}$. I have tried to use nlWaldTest package for nonlinear Wald test, but it doesn't seem to work with glm objects.

Is there any other R package that can test nonlinear hypothesis for glm?

$\endgroup$
  • $\begingroup$ What's the rational function? Some functions at least will allow manipulations that simplify the problem. $\endgroup$ – Glen_b -Reinstate Monica Feb 3 '16 at 1:39
  • $\begingroup$ Thanks. I have included the explicit definition of the function in the question. $\endgroup$ – Nidjsi Feb 4 '16 at 6:50
  • $\begingroup$ If $a_1\neq 0$ then you can multiply numerator and denominator by $a_1$ and get: $f = \frac{a_2a_1 + a_0a_3}{a_1 + a_3}$. Now if $(a_1+a_3)\neq 0$ then $f=0$ if $a_2a_1 + a_0a_3 = 0$. That's still nonlinear, but it is at least a little simpler. $\endgroup$ – Glen_b -Reinstate Monica Feb 4 '16 at 8:19
  • $\begingroup$ Thanks. In the end I have manipulated the likelihood function for probit so it can be written in the suitable form and estimated parameters using max likelihood and retrieved the appropriate standard errors. $\endgroup$ – Nidjsi Feb 10 '16 at 13:48
  • $\begingroup$ Do you think what you did might work as a kind of answer for your question? I'm thinking mainly that if there are other people with a similar problem describing what you ended up doing to solve the problem might be useful. $\endgroup$ – Glen_b -Reinstate Monica Feb 11 '16 at 0:20
0
$\begingroup$

I solve the problem like this. Write the probit equation as: \begin{align} P(y=1|x_1, x_2, x_3)=\Phi \left(\gamma_1 + \gamma_2 x_1 + (\gamma_3 + \gamma_3 \gamma_4 -\gamma_1)x_2 + \gamma_2 \gamma_4 x_3 \right) \end{align} I estimate this equation using ML with respect to $\gamma's$ (with function mle2 from bbmle package). Note that $\gamma_2$ is exactly the parameter I was originally interested in. From Hessian of the ML estimation I can retrieve standard errors.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.