[R] weighted 2 or 3 parameter weibull estimation?

Jeff D. Hamann jeff_hamann at hamanndonald.com
Sat Apr 6 09:19:02 CEST 2002


Subject: Re: [R] weighted 2 or 3 parameter weibull estimation?

Without knowing your cost function (i.e., that passed to optim) its hard
to help.

T.


Here's what I used to obtain my estimates:


# estimate the two parameter weibull
loglike <- function(p) -2*sum(dweibull(expf,p[1],p[2],log=T))
est <- optim( c(1,5), loglike )

as I mentioned, I'm very much a newbie at using optim (and maybe less so
with R), but I hope this help answer your question.

Thanks,
Jeff.



>   I've figured out how to use optim (barely) to estimate 2 parameter =
>   weibull distributions. I can't get over how easy this is. What I need to
=
>   do is use a weight in the observations.....
>
>   For example,=20
>
>   the tree diameters and weights are are=20
>
>   4.70 , 100
>   6.00, 98
>   7.10,  75.0
>   8.10, 86.3
>   8.60, 80.456
>   8.90, 20.5
>   9.50, 16.6
>   11.40, 12.657
>   11.80, 12.47
>   14.50, 8.98
>   16.00,4.5
>   16.90,2.36
>   18.90, 0.256
>
>   which yield
>
>  LOCATION =3D   0.0000              MEAN =3D   10.9921
>     SCALE =3D  12.3436          VARIANCE =3D   18.0027
>     SHAPE =3D   2.8050          SKEWNESS =3D    0.2354
>
>   which are the values without the weights. I can't find any reference to
=
>   weights in the optim function and I'm afraid I'm a little stuck here. =
>   After I figure out how to include the weights, I'll then need to =
>   estimate the 3-parameter estimates. Any help would be greatful.=20
>
>   Thanks,
>   Jeff.



Jeff D. Hamann
Hamann, Donald & Associates, Inc.
PO Box 1421
Corvallis, Oregon USA 97339-1421
Bus. 541-753-7333
Cell. 541-740-5988
jeff_hamann at hamanndonald.com
www.hamanndonald.com


-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list