[R] Questions regarding to JohnSonFit() in the R package Johnson {SuppDists}

William Dunlap wdunlap at tibco.com
Fri Jun 30 19:34:58 CEST 2017


This happens for some inputs, e.g.,
   > JohnsonFit(c(2,3,4,5,6,7,8,30,50,300))
   Error in JohnsonFit(c(2, 3, 4, 5, 6, 7, 8, 30, 50, 300)) :
   Unbounded solution intermediate values out of range
The usual recommendation is to contact the maintainer of the package but
that isn't possible in this case
   > maintainer("SuppDists")
   [1] "ORPHANED"

You can work around the problem to some extent by replacing
   JohnsonFit
with a function that detects errrors in JohnsonFit and returns an indicator
that JohnsonFit fails and lets you move on to the next subset of data.
E.g.,
   function(x) tryCatch(JohnsonFit(x),
                                    error=function(e)
structure(conditionMessage(e), x=x))


Bill Dunlap
TIBCO Software
wdunlap tibco.com

On Fri, Jun 30, 2017 at 9:16 AM, Shiner Yang <shineryang1 at gmail.com> wrote:

> Hello,
>
> I was trying to fit a Johnson curve by first figuring out the parameter
> estimates using JohosnFit of a vector by a group ID using the aggregate
> function. I.E.
>
> aggregate(x, by = list(ID), JohnsonFit)
>
> where x is the variable I am trying to perform JohnsonFit on. It is a
> continuous random variable. However, I keep getting the following error:
>
> Error in JohnsonFit(x) :
> Unbounded solution intermediate values out of range
>
> When I run the fit individually by group ID, it works fine. However I do
> not want to do that manually as there are a large number of groups that
> would be too laborious to do so.
>
> If possible, could you shed some light on this error?
>
> Thanks!
>
> --
> Regards,
>
> Shiner Yang
> B. Sc Statistics & Economics, Commerce Minor | UBC
> Co-President, Science Co-op Students Association
>
>         [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
> 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.
>

	[[alternative HTML version deleted]]



More information about the R-help mailing list