search for: dweibull

Displaying 20 results from an estimated 63 matches for "dweibull".

Did you mean: weibull
2012 Feb 21
5
help error: In dweibull(x, shape, scale, log) : NaNs produzidos
Guys, I'm having an error when I use the command: library(MASS)> dados<-read.table("inverno.txt",header=FALSE)> vento50<-fitdistr(dados[[1]],densfun="weibull")Mensagens de aviso perdidas:1: In dweibull(x, shape, scale, log) : NaNs produzidos2: In dweibull(x, shape, scale, log) : NaNs produzidos3: In dweibull(x, shape, scale, log) : NaNs produzidos4: In dweibull(x, shape, scale, log) : NaNs produzidos5: In dweibull(x, shape, scale, log) : NaNs produzidos6: In dweibull(x, shape, scale, log) : NaNs...
2000 Jan 27
1
error in dweibull (PR#405)
Full_Name: R. Woodrow Setzer, Jr. Version: 0.90.1 OS: linux - Redhat 6.1 Submission from: (NULL) (165.247.155.206) dweibull(0,1,1) evaluates to 0; it should be 1. Note that dweibull(.Machine$double.eps) evaluates to 1. > dweibull(.01,1,1) [1] 0.9900498 > dweibull(.00001,1,1) [1] 0.99999 > dweibull(.Machine$double.eps,1,1) [1] 1 > dweibull(0,1,1) [1] 0 -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-....
2005 Jul 22
1
multiplicate 2 functions
Thks for your answer, here is an exemple of what i do with the errors in french... > tmp [1] 200 150 245 125 134 345 320 450 678 > beta18 Erreur : Objet "beta18" not found //NORMAL just to show it > eta [1] 500 > func1<-function(beta18) dweibull(tmp[1],beta18,eta) > func1<-func1(beta18) * function(beta18) dweibull(tmp[2],beta18,eta) Erreur dans dweibull(tmp[1], beta18, eta) : Objet "beta18" not found //I don't want to evaluate weibull immediatly just want to initialize the function then integrate on beta18,i have to...
2011 Apr 27
3
MASS fitdistr with plyr or data.table?
...39;site','wind_speed') fitted<-weib.test[,fitdistr(wind_speed,'weibull'),by=site] Error in class(ans[[length(byval) + jj]]) = class(testj[[jj]]) : invalid to set the class to matrix unless the dimension attribute is of length 2 (was 0) In addition: Warning messages: 1: In dweibull(x, shape, scale, log) : NaNs produced ... 10: In dweibull(x, shape, scale, log) : NaNs produced (the warning messages are normal from what I can tell) or using plyr: set.seed(144) weib.dist<-rweibull(10000,shape=3,scale=8) weib.test.too<-data.frame(cbind(1:10,weib.dist)) names(weib.test.to...
2006 Jul 14
1
dweibull retuns NaN instead of Inf (PR#9080)
Full_Name: G?ran Brostr?m Version: 2.3.1 OS: Linux, ubuntu Submission from: (NULL) (85.11.40.53) > dweibull(0, 0.5, 1) [1] NaN Warning message: NaNs produced in: dweibull(x, shape, scale, log) should give Inf (and no Warning). Compare with > dgamma(0, 0.5, 1) [1] Inf This happens when 'shape' < 1.
2003 Oct 20
1
Fitting a Weibull/NaNs
...ome data via maximum likelihood estimation. I'm following the procedure described by Doug Bates in his "Using Open Source Software to Teach Mathematical Statistics" but I keep getting warnings about NaNs being converted to maximum positive value: > llfunc <- function (x) { -sum(dweibull(AM,shape=x[1],scale=x[2], log=TRUE))} > mle <- nlm(llfunc,c(shape=1.5,scale=40), hessian=TRUE) Warning messages: 1: NaNs produced in: dweibull(x, shape, scale, log) 2: NA/Inf replaced by maximum positive value 3: NaNs produced in: dweibull(x, shape, scale, log) 4: NA/Inf replaced by maxim...
2006 Jun 02
2
Problem with mle
...to identify the best distribution. But when I run the script below (which is part of my original script), I get one error message for the first call of mle: Error in solve.default(oout$hessian) : Lapack routine dgesv: system is exactly singular In addition: Warning messages: 1: NaNs produced in: dweibull(x, shape, scale, log) 2: NaNs produced in: dweibull(x, shape, scale, log) 3: NaNs produced in: dweibull(x, shape, scale, log) 4: NaNs produced in: dweibull(x, shape, scale, log) What can I do to avoid this problem? The second one is following the second call of mle: summary(fit.NE) gives me the s...
2009 Nov 20
2
How to use results of distribution fitting for further processing?
This is probably simple, but I have a hard time finding the solution. Any help greatly appreciated.   I would like to use the results of fitdistr(z,densfun=dweibull,start=list(scale=1,shape=1)) for further processing.  How do I assign the values of scale and shape to b and a without manually entering the numbers?   TIA __________________________________________________________________ Looking for the perfect gift? Give the gift of Flickr! [[alterna...
2012 Feb 21
3
HELP ERROR Weibull values must be > 0
GUYS, I NEED HELP WITH ERROR: library(MASS) > dados<-read.table("mediaRGinverno.txt",header=FALSE) > vento50<-fitdistr(dados[[1]],densfun="weibull") Erro em fitdistr(dados[[1]], densfun = "weibull") : Weibull values must be > 0 WHY RETURN THIS ERROR? WHAT CAN I DO? BEST REGARDS [[alternative HTML version deleted]]
2012 Feb 23
3
why is generating the same graph???
...le("inverno.txt",header=FALSE) vento50<-fitdistr(dados[[1]],densfun="weibull") png(filename="invernoRG.png",width=800,height=600) hist(dados[[1]], seq(0, 18, 0.5), prob=TRUE, xlab="Velocidade (m/s)",ylab="Densidade", main="50 m") curve(dweibull(x, shape=0.614, scale=2.435), 0,18,add=T, col='red') dev.off() Best Regards [[alternative HTML version deleted]]
2005 Jul 22
1
Generate a function
hi all, I need to generate a function inside a loop: tmp is an array for (i in 1:10) { func<- func * function(beta1) dweibull(tmp[i],beta1,eta) } because then i need to integrate this function on beta. I could have written this : func<-function(beta1) prod(dweibull(tmp,beta1,eta)) (with eta and beta1 set) but it is unplottable and no integrable... i could make it a bit different but if i do that ( prod(tmp)=~Inf )...
2011 Nov 03
1
Fit continuous distribution to truncated empirical values
...package) and fitdist (from the fitdistrplus package), but I could not get them working, e.g. fitdistr(left, "weibull", upper=24) Error in optim(x = c(529L, 528L, 527L, 526L, 525L, 524L, 523L, 522L, 521L, : L-BFGS-B needs finite values of 'fn' In addition: Warning message: In dweibull(x, shape, scale, log) : NaNs produced Am I doing something wrong? Thanks, Michele p.s. I have seen similar posts, e.g., http://tolstoy.newcastle.edu.au/R/help/05/02/11558.html, but I am not sure whether I can apply the same approach here.
2005 Sep 06
2
(no subject)
...334 how am I supposed to know what starting values i have to take? i get different parameterestimates depending on the starting values i choose, this shouldn't be, no? how am i supposed to know, which the "right" estimates should be? > library(MASS) > fitdistr(data2,densfun=dweibull,start=list(scale=2 ,shape=1 )) scale shape 1.378874e+04 8.788857e-01 (3.842224e+03) (1.312395e-01) > fitdistr(data2,densfun=dweibull,start=list(scale=6 ,shape=2 )) scale shape 7.81875000 0.12500000 (4.18668905) (0.01803669) #if i use the lognormaldistributi...
2011 Oct 20
1
R code Error : Hybrid Censored Weibull Distribution
...################################ f3<-function(t,r){ #calculation for t1 fb1<-function(t,r){ v1<-numeric(0) for(j in 1:r){ int1<-function(x1){ int_1<- (1/p+log(x1/lamda))^2 * j * choose(n,j) * (pweibull(x1,shape=p,scale=lamda))^(j-1) * (1 - pweibull(x1,shape=p,scale=lamda))^(n-j) * dweibull(x1,shape=p,scale=lamda) int_1 } v1[j]<-integrate(int1,lower=0,upper=t)$value } sum(v1) } #calculation for t2 fb2<-function(t,r){ v2<-numeric(0) for(j in 1:r){ int2<-function(x2){ int_2<- (1/p+log(x2/lamda))*(-p/lamda) * j * choose(n,j) * (pweibull(x2,shape=p,scale=lamda))^(j-1) *...
1999 Dec 09
1
nlm() problem or MLE problem?
I am trying to do a MLE fit of the weibull to some data, which I attach. fitweibull<-function() { rt<-scan("r/rt/data2/triam1.dat") rt<-sort(rt) plot(rt,ppoints(rt)) a<-9 b<-.27 fn<-function(p) -sum( log(dweibull(rt,p[1],p[2])) ) cat("starting -log like=",fn(c(a,b)),"\n") out<-nlm(fn,p=c(a,b), hessian=TRUE) xfit<-seq(min(rt),max(rt),(max(rt)-min(rt))/100) yfit<-pweibull(xfit,out$estimate[1], out$estimate[2]) lines(xfit,yfit,lty=2) yfit2<-pweibull(xfit,a, b) lines(xfit,yfit2)...
2006 Aug 16
3
fitting truncated normal distribution
Hello, I am a new user of R and found the function dtnorm() in the package msm. My problem now is, that it is not possible for me to get the mean and sd out of a sample when I want a left-truncated normal distribution starting at "0". fitdistr(x,dtnorm, start=list(mean=0, sd=1)) returns the error message "Fehler in "[<-"(`*tmp*`, x >= lower & x <= upper,
2008 Aug 21
1
pnmath compilation failure; dylib issue?
...dynamic_lookup -single_module -multiply_defined suppress -L/usr/local/ lib -o pnmath.so bd0.o beta.o chebyshev.o choose.o d1mach.o dbeta.o dbinom.o dcauchy.o dchisq.o dexp.o df.o dgamma.o dgeom.o dhyper.o dlnorm.o dlogis.o dnbeta.o dnbinom.o dnchisq.o dnf.o dnorm.o dnt.o dpois.o dt.o dunif.o dweibull.o fmax2.o fmin2.o ftrunc.o gamma.o gamma_cody.o i1mach.o imax2.o imin2.o lbeta.o lgamma.o lgammacor.o mlutils.o pbeta.o pbinom.o pcauchy.o pchisq.o pexp.o pf.o pgamma.o pgeom.o phyper.o plnorm.o plogis.o pnbeta.o pnbinom.o pnchisq.o pnf.o pnmath.o pnorm.o pnt.o polygamma.o ppois.o pt.o ptuk...
2008 Apr 15
1
Weibull
Dear R users, This is a basic question. I want to fit a Weibull distribution. fitdistr(data, "weibull") works and it is a maximum likelihood fitting. Is it a good method ? Or is it better to write a function for the log-likelihood and the gradient and to use a numerical routine ? Fitdistr works for uncensored data, but what can I use for censored (and uncensored) data ? Thank you
2008 Oct 29
0
Error using fitting weibull distribution to some data
...(datos,"weibull",lower=0) Error in optim(x = c(1.4625e-06, 0.257854, 0.0001217545, 0.11421005, 0.028721576, : L-BFGS-B *needs finite values of 'fn' * where "datos" is a vector of length=1000 between 1.4625e-06 and 0.8867114 I add the lower argument in order to avoid dweibull produce "NaNs".If I don't add the lower argument, the call to fitdistr returns the parameter estimates with the warning messages below: Warning message: In dweibull(x, shape, scale, log) : Se han producido NaNs Does anyone know how to use fitdistr using the lower parameter to avoid...
2009 Apr 30
1
finite mixture model (2-component Weibull): plotting Weibull components?
Dear Knowledgeable R Community Members, Please excuse my ignorance, I apologize in advance if this is an easy question, but I am a bit stumped and could use a little guidance. I have a finite mixture modeling problem -- for example, a 2-component Weibull mixture -- where the components have a large overlap, and I am trying to adapt the "mclust" package which concern to normal