Shiner Yang
2017-Jun-30 16:16 UTC
[R] Questions regarding to JohnSonFit() in the R package Johnson {SuppDists}
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]]
William Dunlap
2017-Jun-30 17:34 UTC
[R] Questions regarding to JohnSonFit() in the R package Johnson {SuppDists}
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]]
Reasonably Related Threads
- Johnson's Sb distribution
- Spearman probabilities and SuppDists
- Generating series of distributions with the same skewness and different kurtosis or with same kurtosis and different skewness?
- Johnson transformation
- how to ignore the arp request for the alias ip in freebsd