Dear Yang,
This is an error message related to the model fitting. It's an error
message coming from VGAM package rather than zelig. I first thought that
you didn't scale the covariates right. For example, the max value of your
i.wage variable is 217000. Sometimes, this causes a problem in estimation.
And rescaling it might work: say divide it by 10000. But it looks like
that this is not the problem.
It might be that bprobit in VGAM cannot deal with endogenous covariates.
You might want to contact the author of the program, Thomas Yee. He can be
reached at t.yee(a)auckland.ac.nz
Best,
Kosuke
---------------------------------------------------------
Kosuke Imai Office: Corwin Hall 041
Assistant Professor Phone: 609-258-6601
Department of Politics eFax: 973-556-1929
Princeton University Email: kimai(a)Princeton.Edu
Princeton, NJ 08544-1012 http://www.princeton.edu/~kimai
---------------------------------------------------------
On Tue, 7 Dec 2004, Yang Lin wrote:
> Dear Kosuke & Zelig list,
>
> Thanks for all your help
>
> The omit function works with our simple model:
>
> z.out <- zelig(cbind(use,ghi) ~ ghi + ghi.quintile + i.wage + educfull
> +spouse + child,
> omit= list("1"= c("spouse","child"),"2"= c("ghi", "ghi.quintile")),
> model = "bprobit", data = subs)
>
> However, when we expand it to our full model:
>
> z.out <- zelig(cbind(ghi, use) ~ ghi + ghi.quintile + ssc + otherins +
> i.wage + educfull + edad + male + severe + quintile + quichua + othlang +
> npers + time.care + area2 + area3 + area4 + region2 + region3 +
> price.decile + hcenter + hospital + drugs + doctor + age.urban +
> time.care2 + educ.oriente + age.sierra + hosp.urban + spouse + child +
> grandchild + comrate,
> omit= list("1"= c("ghi", "ghi.quintile"),"2"= c("spouse","child",
> "grandchild", "comrate")),
> model = "bprobit", data = subs)
>
> We get the following error message:
>
> Error in lm.fit(xbig, z.big, ...) : NA/NaN/Inf in foreign function call
> (arg 1)
> In addition: Warning messages:
> 1: NaNs produced in: log(x)
> 2: fitted values close to 0 or 1 in: tfun(mu = mu, y = y, w = w, res =
> FALSE, eta = eta, extra)
> 3: NaNs produced in: log(x)
> 4: fitted values close to 0 or 1 in: tfun(mu = mu, y = y, w = w, res =
> FALSE, eta = eta, extra)
>
> Is there a way of reparametizing? (We utilized several dummy variables
> which might explain why log(0) wouldn't yield any results)
>
> Thanks again!
>
> Yang
> Chunling
> Cecilia
>
>
> On Tue, 7 Dec 2004, Kosuke Imai wrote:
>
> > Dear Yang,
> > We have changed the syntax of bprobit/blogit when we updated to version
> > 2.0-7. Please follow the new syntax, which we believe is better, in the
> > manual: http://gking.harvard.edu/zelig/docs/Input_Values2.html In
> > particular, there are two inputs: omit and constrain. Please do not
> > hesitate to contact us again if you still have problems or the manual is
> > not clear.
> > Thanks,
> > Kosuke
> >
> > ---------------------------------------------------------
> > Kosuke Imai Office: Corwin Hall 041
> > Assistant Professor Phone: 609-258-6601
> > Department of Politics eFax: 973-556-1929
> > Princeton University Email: kimai(a)Princeton.Edu
> > Princeton, NJ 08544-1012 http://www.princeton.edu/~kimai
> > ---------------------------------------------------------
> >
> > > ---------- Forwarded message ----------
> > > Date: Mon, 6 Dec 2004 18:07:53 -0500 (EST)
> > > From: Yang Lin <yanglin(a)fas.harvard.edu>
> > > To: zelig(a)latte.harvard.edu, owner-zelig(a)latte.harvard.edu
> > > Cc: Chunling Lu <chunling_lu(a)harvard.edu>, cvidal(a)camail.harvard.edu
> > > Subject: Zelig Questions
> > >
> > > Dear Zelig-helper,
> > >
> > > We are using Zelig biprobit command and ran into problems.
> > >
> > > The simple form of the model we used is like this:
> > >
> > > Y = f(x1, x2, z*x1, z)
> > >
> > > where y is dummy of seeking medical care, x1 is quantile of the
> > > expenditure, x2 is age, z is dummy of joining insurance.
> > >
> > > By the model, z is an endogenous variable, it is the function of
> > >
> > > z=f(x1, x2, x3)
> > >
> > > where x1 and x2 are the same as in Y model, and x3 is an identifying
> > > variable "relationship to the head of household".
> > >
> > > We want to use Zelig to run biprobit model.
> > >
> > > Our R code and data are attached here. It does not generate the
> > > different results based on the different constraints we set.
> > >
> > > (Also using different versions of R program and Zelig models produce
> > > different results... we are not sure which to use)
> > >
> > > Could you please let us know why.
> > >
> > > Thanks very much.
> > >
> > > Yang Lin
> > > Cecilia Vidal
> > > Chunling
> > >
> >
>
-
Zelig Mailing List, served by Harvard-MIT Data Center
Send messages: zelig(a)latte.harvard.edu
[un]subscribe Options: http://lists.hmdc.harvard.edu/?info=zelig
Zelig program information: http://gking.harvard.edu/zelig/
Dear Yang,
We have changed the syntax of bprobit/blogit when we updated to version
2.0-7. Please follow the new syntax, which we believe is better, in the
manual: http://gking.harvard.edu/zelig/docs/Input_Values2.html In
particular, there are two inputs: omit and constrain. Please do not
hesitate to contact us again if you still have problems or the manual is
not clear.
Thanks,
Kosuke
---------------------------------------------------------
Kosuke Imai Office: Corwin Hall 041
Assistant Professor Phone: 609-258-6601
Department of Politics eFax: 973-556-1929
Princeton University Email: kimai(a)Princeton.Edu
Princeton, NJ 08544-1012 http://www.princeton.edu/~kimai
---------------------------------------------------------
> ---------- Forwarded message ----------
> Date: Mon, 6 Dec 2004 18:07:53 -0500 (EST)
> From: Yang Lin <yanglin(a)fas.harvard.edu>
> To: zelig(a)latte.harvard.edu, owner-zelig(a)latte.harvard.edu
> Cc: Chunling Lu <chunling_lu(a)harvard.edu>, cvidal(a)camail.harvard.edu
> Subject: Zelig Questions
>
> Dear Zelig-helper,
>
> We are using Zelig biprobit command and ran into problems.
>
> The simple form of the model we used is like this:
>
> Y = f(x1, x2, z*x1, z)
>
> where y is dummy of seeking medical care, x1 is quantile of the
> expenditure, x2 is age, z is dummy of joining insurance.
>
> By the model, z is an endogenous variable, it is the function of
>
> z=f(x1, x2, x3)
>
> where x1 and x2 are the same as in Y model, and x3 is an identifying
> variable "relationship to the head of household".
>
> We want to use Zelig to run biprobit model.
>
> Our R code and data are attached here. It does not generate the
> different results based on the different constraints we set.
>
> (Also using different versions of R program and Zelig models produce
> different results... we are not sure which to use)
>
> Could you please let us know why.
>
> Thanks very much.
>
> Yang Lin
> Cecilia Vidal
> Chunling
>
-
Zelig Mailing List, served by Harvard-MIT Data Center
Send messages: zelig(a)latte.harvard.edu
[un]subscribe Options: http://lists.hmdc.harvard.edu/?info=zelig
Zelig program information: http://gking.harvard.edu/zelig/
Hi all,
Is adding wrappers around the quantile regression R-package (quantreg) being considered/implemented? This would be really appreciated!
Rein Halbersma
--
Aarts de Jong Wilms Goudriaan Public Economics BV
Lange Voorhout 94
2514 EJ Den Haag
+31(0)70 311 48 56 (direct)
+31(0) 6 1296 3409 (mobiel)
+31(0)70 311 48 66 (fax)
-
Zelig Mailing List, served by Harvard-MIT Data Center
Send messages: zelig(a)latte.harvard.edu
[un]subscribe Options: http://lists.hmdc.harvard.edu/?info=zelig
Zelig program information: http://gking.harvard.edu/zelig/