Re: [R] mob (party package) question

From: Achim Zeileis <Achim.Zeileis_at_uibk.ac.at>
Date: Sun, 13 Jun 2010 00:26:08 +0200 (CEST)

On Fri, 11 Jun 2010, tudor wrote:

>
> Dear useRs:
>
> I try to use mob from the party package (thanks Achim and Co.!) to model
> based recursive partition a data set. The model is a logistic regression
> specified with model=glinearModel and family=binomial(). Running mob
> results in a few warnings of the type: In glm.fit ... algorithm did not
> converge. As I speculate that this may be due to an insufficient number of
> iterations I am wondering if any of you knows how to pass arguments to
> glm.fit from within mob (e.g., epsilon and maxit). All my attempts to do it
> by myself failed. All suggestions are welcome.

Hmm, good point, currently the "control" argument to glm.fit() can not be passed through mob() because this has an argument fo the same nam. I'll add this to our list of improvements that need to be done.

You can try to work around this by writing your own StatModel driver, e.g., glinearModel2. However, before doing that, I would try to see whether this is really the problem. I guess it's more likely that there are other problems with that particular subset, e.g., (quasi-)complete separation or no variation in one of the variables. Simply set "verbose = TRUE" when calling mob() and track which subset causes the error. Then you can recreate that subset by simply calling subset() and checking whether glm() or glm.fit() work appropriately on that sub-sample.

hth,
Z

> My system: Windows XP, R2.10.1.
>
> Thank you.
>
> Tudor
> --
> View this message in context: http://r.789695.n4.nabble.com/mob-party-package-question-tp2252500p2252500.html
> Sent from the R help mailing list archive at Nabble.com.
>
> ______________________________________________
> R-help_at_r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>



R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Sat 12 Jun 2010 - 22:29:53 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Sun 13 Jun 2010 - 03:30:29 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive