That worked, thanks!

On Fri, Oct 28, 2011 at 12:27 PM, bbolker [via R] <
ml-node+s789695n3948463...@n4.nabble.com> wrote:

> ethan.shepherd <someguy235 <at> gmail.com> writes:
>
> >
> > I'm getting errors when running what seems to be a simple Weibull
> > distribution function:
> >
>
>   [snip]
>
> > If I change the data to this:
> >
>
>  [snip]
>
> > I get the error "Error in fitdistr(x, "weibull"): optimization failed"
> >
> > I can run a Weibull distribution in SAS with this same data, and it
> gives me
> > what looks like a reasonable answer.
> >
>
>
>  How about:
>
> x <- c(4,22,26,27,44,46,83,83,122,125,129,151,153,157,171,
> 173,186,199,201,202,205,219,239,242,252,315,326,449,771)
>
> hist(x)
> fit2 <-fitdistr(x, 'weibull',lower=c(0.01,0.01))
>
> hist(x,freq=FALSE,col="gray",ylim=c(0,0.004))
> with(as.list(coef(fit2)),curve(dweibull(x,shape=shape,scale=scale),
>      add=TRUE,col=2))
>
> ______________________________________________
> [hidden email] <http://user/SendEmail.jtp?type=node&node=3948463&i=0>mailing 
> list
> 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.
>
>
> ------------------------------
>  If you reply to this email, your message will be added to the discussion
> below:
>
> http://r.789695.n4.nabble.com/weibull-fitdistr-problem-optimization-failed-tp3947997p3948463.html
>  To unsubscribe from weibull fitdistr problem: optimization failed, click
> here<http://r.789695.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=3947997&code=c29tZWd1eTIzNUBnbWFpbC5jb218Mzk0Nzk5N3wyNDkwMTc5NjY=>.
>
>



-- 
someguy...@gmail.com
(828) 242-0036

"You just lost The Game."


--
View this message in context: 
http://r.789695.n4.nabble.com/weibull-fitdistr-problem-optimization-failed-tp3947997p3963303.html
Sent from the R help mailing list archive at Nabble.com.
        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
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.

Reply via email to