Using Fit Censored for other distributions?Hi. I'm interested in using the Fit Censored() function to fit distributions to my data. So far it appears I can fit only to these distributions though: Weibull, LogNormal, LogLogistic, Frechet, SEV, Normal, Logistic, and LEV.
My question: is there a way to fit to JohnsonSU/SL/SB or normal multimodal using this function? For example, this script returns an error for me:
Names Default To Here(1);
result =
Fit Censored(
Distribution("JohnsonSU"),
Y(
[142, 156, 163, 198, 204, 205, 232, 239,
240, 261, 280, 296, 323, 344]
)
);
Show(result);Error: Distribution 'JohnsonSU' unrecognized in access or evaluation of 'Distribution' , Distribution(/*###*/"JohnsonSU")
Or is it possible I'm overlooking some other function that can fit a distribution to my data? While it is true I can always use the Distribution platform to fit my data to alternative distributions, the Fit Censored function appears to be much faster. I assume it has less overhead.
Any advice is appreciated. Thanks.
ScriptingRe: Using Fit Censored for other distributions?Fit Censored() function only fits most distributions that are available in the Life Distribution platform, but not some of the distributions that are only available in the Distribution platform. The function cannot fit the two distributions that you are interested in.
It is interesting that you said Fit Censored() is much faster. It is understandable, because the platform has some overhead on generating graphics and other reports. But unless your data is quite large, or you are analyzing many data, the difference should be negligible. Especially, if you are comparing Weibull, Lognormal, etc.
If you feel Distribution is slow, because of the two distributions that you are interested in, then I guess there is a misunderstanding. Because the two distributions that you are interested in are complex models and require intensive computation. Even they were available in Fit Censored, there won't be much difference.
Re: Using Fit Censored for other distributions?Replying to my own question.
I did some more digging and found this function: Fit Transform to Normal().
Names Default To Here(1);
datavec = [-3.7975076, 0.48221038, -1.3082712,
-1.860647, -6.9470789, -17.237024, -19.470857,
-6.1855986, 2.16525629, -30.990061];
freqvec = [1, 1, 1, 1, 1, 2, 2, 2, 2, 2];
As Table(datavec || freqvec);
Column(1) << set name("x");
Column(2) << set name("freq vec");
results =
Fit Transform To Normal(
Distribution("glog"),
Y(datavec),
freq(freqvec)
);
Show(results);I'm trying to figure out what it does though. At first glance, it appears to fit a vector of data to Johnson SL/SB/SU or GLog distributions, returning the parameters for that respective distribution. If so, this is exactly what I want. Is anyone more familiar with this function though, and do I understand it correctly?
I'm confused bc the function name seems to imply it is transforming the vector into a normal distribution, but if that were the case, how would that be different from simply fitting your data to a normal distribution? I don't fully understand when this function would be used. If anyone out there knows, please share!