weibull

Weibull distribution and the data in the same figure (with numpy and scipy) [closed]

风格不统一 提交于 2019-12-25 09:29:42
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed last year . Here is my data: https://www.dropbox.com/s/xx02015pbr484es/Book2.xlsx This is my output: And this is the desired output: As you can see,I want "the data" and the "Weibull distribution" together, (in the same figure). This is my code: (loc, scale) = s.exponweib.fit_loc_scale(mydata, 0.5, 0.5) print loc, scale x =

R optim() L-BFGS-B needs finite values of 'fn' - Weibull

风流意气都作罢 提交于 2019-12-25 08:19:36
问题 I try to estimate the three parameters a, b0 and b1 with the optim() function. But I always get the error: Error in optim(par = c(1, 1, 1), fn = logweibull, method = "L-BFGS-B", : L-BFGS-B needs finite values of 'fn' t<-c(6,6,6,6,7,9,10,10,11,13,16,17,19,20,22,23,25,32,32,34,35,1,1,2,2,3,4,4,5,5,8,8,8,8,11,11,12,12,15,17,22,23) d<-c(0,1,1,1,1,0,0,1,0,1,1,0,0,0,1,1,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1) X<-c(1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0

Error in Weibull distribution

那年仲夏 提交于 2019-12-24 13:38:30
问题 file.data has the following values to fit with Weibull distribution, x y 2.53 0.00 0.70 0.99 0.60 2.45 0.49 5.36 0.40 9.31 0.31 18.53 0.22 30.24 0.11 42.23 Following the Weibull distribution function f(x)=1.0-exp(-lambda*x**n) , it is giving error: fit f(x) 'data.dat' via lambda, n and finally plotting f(x) and xy graph have large discrepancy. Any feedback would be highly appreciated. Thanks! 回答1: Several things: You must skip the first line (if it really is x y ). You must use the correct

Errors running Maximum Likelihood Estimation on a three parameter Weibull cdf

一曲冷凌霜 提交于 2019-12-22 14:57:12
问题 I am working with the cumulative emergence of flies over time (taken at irregular intervals) over many summers (though first I am just trying to make one year work). The cumulative emergence follows a sigmoid pattern and I want to create a maximum likelihood estimation of a 3-parameter Weibull cumulative distribution function. The three-parameter models I've been trying to use in the fitdistrplus package keep giving me an error. I think this must have something to do with how my data is

Maximum Likelihood Estimation for three-parameter Weibull distribution in r

时光怂恿深爱的人放手 提交于 2019-12-21 20:44:30
问题 I want to estimate the scale, shape and threshold parameters of a 3p Weibull distribution. What I've done so far is the following: Refering to this post, Fitting a 3 parameter Weibull distribution in R I've used the functions EPS = sqrt(.Machine$double.eps) # "epsilon" for very small numbers llik.weibull <- function(shape, scale, thres, x) { sum(dweibull(x - thres, shape, scale, log=T)) } thetahat.weibull <- function(x) { if(any(x <= 0)) stop("x values must be positive") toptim <- function

How to generate the Weibull's parameters k and c in Matlab?

老子叫甜甜 提交于 2019-12-13 09:48:03
问题 Can anyone explain to me how to generate the Weibull distribution parameters k and c, in Matlab? I have a file of 8000 data of wind speed, and I'd like to do the following: Generate the Weibull's k and c parameters of those. Plot the probability density function against the wind speed. I am new in Matlab and have not yet been able to do this. 回答1: If you have the Statistics toolbox, you can use fitdist: pd = fitdist(x,'Weibull') where x is your data. I'm guessing it should return the

“Wrong number of args for this type of survival data” when coding a survival object in R

牧云@^-^@ 提交于 2019-12-12 22:20:20
问题 I'm experiencing the above error message when trying to run a survival analysis with Weibull distribution, in R. My data is a bit tricky in that it contains both left and right censored observations. I followed instructions found on https://stat.ethz.ch/R-manual/R-devel/library/survival/html/Surv.html: "Interval censored data can be represented in two ways. For the first use type = "interval" and the codes shown above. In that usage the value of the time2 argument is ignored unless event=3.

Weibull cumulative distribution function starting from “fitdistr” command

对着背影说爱祢 提交于 2019-12-12 09:14:43
问题 I've used fitdistr function from R MASS package to adjust a Weibull 2 parameters probability density function (pdf). This is my code: require(MASS) h = c(31.194, 31.424, 31.253, 25.349, 24.535, 25.562, 29.486, 25.680, 26.079, 30.556, 30.552, 30.412, 29.344, 26.072, 28.777, 30.204, 29.677, 29.853, 29.718, 27.860, 28.919, 30.226, 25.937, 30.594, 30.614, 29.106, 15.208, 30.993, 32.075, 31.097, 32.073, 29.600, 29.031, 31.033, 30.412, 30.839, 31.121, 24.802, 29.181, 30.136, 25.464, 28.302, 26.018,

How can I plot two cumulative distributions curve as line type in same plot

纵饮孤独 提交于 2019-12-12 04:42:41
问题 I want to plot cumulative distributions curve for Weibull distribution over empirical cumulative distribution curve. I have tried with this several times but it does not serve the way I want. Here is the command: x<-(SIZEDIST$AVG.µm.) x plot(x,pweibull(x,shape=1.120662,scale=18.496778),type="l",col=4) plot(ecdf(x),add=TRUE) 回答1: Use lines instead of plot plot(x,pweibull(x,shape=1.120662,scale=18.496778),type="l",col=4) lines(ecdf(x),col='red') 回答2: Like this? set.seed(1) # for reproducibility

The Weibull distribution in R (ExtDist)

风流意气都作罢 提交于 2019-12-11 10:22:51
问题 Has anyone had problems with the Weibull distribution using the ExtDist Package? From the documentation: Parameter Estimation for a distribution with unknown shape parameters Example from: Rinne (2009) Dataset p.338 and example pp.418-419 Parameter estimates are given as shape = 99.2079 and scale = 2.5957. The log-likelihood for this data and Rinne's parameter estimates is -1163.278. data <- c(35,38,42,56,58,61,63,76,81,83,86,90,99,104,113,114,117,119,141,183) est.par <- eWeibull(X=data,