[R] Comparison of two weibull distributions
Ben Bolker
bbolker at gmail.com
Sun Nov 3 14:56:52 CET 2013
kmmoon100 <k.moon <at> student.unimelb.edu.au> writes:
>
> Hello,
>
> How can I do a test of two weibull distributions?
> I have two weibull distribution sets from two wind datasets in order to
> check whether they are same.
> I thought 2 sample t-test would be applicable but I couldn't find any ways
> to do that on the Internet.
> Does anyone know what type of test is applicable to my purpose? and what R
> function can you recommend?
> Plus, if it turned out that there is a difference between the two datasets,
> can I just fit a linear line between the datasets?
>
> Kind Regards,
>
> Kangmin.
(1) Fit a single model to the combined (pooled data) (e.g. with
MASS::fitdistr()); (2) fit separate models to the individual data
sets; (3) compare the log-likelihood of the pooled model to the
sum of the log-likelihoods of the separate models. According to
the likelihood ratio test, the p-value of the differences is:
pchisq(2*(logLik_sum-logLik_pooled),df=2,lower.tail=FALSE)
(2 df because the separate models have a total of 4 parameters,
2 greater than the pooled model)
More information about the R-help
mailing list