Displaying 20 results from an estimated 10000 matches similar to: "Determining cause of error?"
2008 Aug 03
2
Determining model parameters
This may be a begining question. If so, please bear with me.
If I have some data that based on the historgram and other plots it "looks" like a beta distribution. Is there a function or functions within R to help me determine the model parameters for such a distirbution? Similarily for other "common" distirbutions, Poisson(lambda), Chi-Square(degrees of freedom, chi-square
2010 Jan 28
4
Problems with fitdistr
Hi,
I want to estimate parameters of weibull distribution. For this, I am using
fitdistr() function in MASS package.But when I give fitdistr(c,"weibull") I
get a Error as follows:-
Error in optim(x = c(4L, 41L, 20L, 6L, 12L, 6L, 7L, 13L, 2L, 8L, 22L,
:
non-finite value supplied by optim
Any help or suggestions are most welcomed
--
View this message in context:
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]]
2008 Oct 07
3
Fitting weibull, exponential and lognormal distributions to left-truncated data.
Dear All,
I have two questions regarding distribution fitting.
I have several datasets, all left-truncated at x=1, that I am attempting
to fit distributions to (lognormal, weibull and exponential). I had
been using fitdistr in the MASS package as follows:
fitdistr<-(x,"weibull")
However, this does not take into consideration the truncation at x=1. I
read another posting in this
2011 Apr 27
3
MASS fitdistr with plyr or data.table?
I am trying to extract the shape and scale parameters of a wind speed
distribution for different sites. I can do this in a clunky way, but
I was hoping to find a way using data.table or plyr. However, when I
try I am met with the following:
set.seed(144)
weib.dist<-rweibull(10000,shape=3,scale=8)
weib.test<-data.table(cbind(1:10,weib.dist))
2003 Jul 28
1
Optimization failed in fitting mixture 3-parameter Weibull distri bution using fitdistr()
Dear All;
I tried to use fitdistr() in the MASS library to fit a mixture
distribution of the 3-parameter Weibull, but the optimization failed.
Looking at the source code, it seems to indicate the error occurs at
if (res$convergence > 0)
stop("optimization failed").
The procedures I tested are as following:
>w3den <- function(x, a,b,c)
2003 Jul 25
5
named list 'start' in fitdistr
Hi R lovers!
I'd like to know how to use the parameter 'start' in the function
fitdistr()
obviously I have to provide the initial value of the parameter to optimize
except in the case of a certain set of given distribution
Indeed according to the help file for fitdistr
" For the following named distributions, reasonable starting values
will be computed if `start'
2011 Oct 28
1
weibull fitdistr problem: optimization failed
I'm getting errors when running what seems to be a simple Weibull
distribution function:
This works:
x <-
c(23,19,37,38,40,36,172,48,113,90,54,104,90,54,157,51,77,78,144,34,29,45,16,15,37,218,170,44,121)
rate <- c(.01,.02,.04,.05,.1,.2,.3,.4,.5,.8,.9)
year <- c(100,50,25,20,10,5,3.3,2.5,2,1.2,1.1)
library(MASS)
x <- sort(x)
tryCatch(
f<-fitdistr(x, 'weibull'),
error
2011 Nov 03
1
Fit continuous distribution to truncated empirical values
Hi all,
I am trying to fit a distribution to some data about survival times.
I am interested only in a specific interval, e.g., while the data lies in the interval (0,...., 600), I want the best for the interval (0,..., 24).
I have tried both fitdistr (MASS package) and fitdist (from the fitdistrplus package), but I could not get them working, e.g.
fitdistr(left, "weibull", upper=24)
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
2011 Jun 23
2
Confidence interval from resampling
Dear R gurus,
I have the following code, but I still not know how to estimate and extract
confidence intervals (95%CI) from resampling.
Thanks!
~Adriana
#data
penta<-c(770,729,640,486,450,410,400,340,306,283,278,260,253,242,240,229,201,198,190,186,180,170,168,151,150,148,147,125,117,110,107,104,85,83,80,74,70,66,54,46,45,43,40,38,10)
x<-log(penta+1)
plot(ecdf(x),
2008 Oct 22
2
Weibull parameter estimation
Dear R-users
I would like to fit weibull parameters using "Method of moments" in order to
provide the inital values of the parameter to de function 'fitdistr' . I
don`t have much experience with maths and I don't know how to do it.
Can anyone please put me in the rigth direction?
Borja
[[alternative HTML version deleted]]
2008 Aug 06
1
Weibull Likelihod function.
Is there a likelihod function for the Weibull distribution in 'R'? I found the following reference:
http://www.weibull.com/LifeDataWeb/weibull_log_likelihood_functions_and_their_partials.htm
But I had a hard time understanding the parameters required Particularly 'number of groups of times-to-failure data points", "number of groups of suspension data points", and
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
2009 Jan 19
1
ifelse help?
I am having a hard time understanding what is happening with ifelse.
Let me illustrate:
h <- numeric(5)
p <- 1:5
j <- floor(j)
x <- 1:1000
ifelse(h == 0, x[j+2], 1:5)
[1] 2 3 4 5 6
My question is, "shouldn't this be retruning 25 numbers?" It seems that the ifelse should check 5 values of h for zero. For each of the 5 values I am thinking it should return an array of 5
2004 Sep 23
2
fitting weibull distribution
Dear all,
I get the following error message. And I cannot quite work out what is
wrong. I think the optim gets infinite values. Certainly my data do not
have any infinite values. How can I solve this?
fitdistr(A1, "weibull")
Error in optim(start, mylogfn, x = x, hessian = TRUE, ...) :
non-finite value supplied by optim
I am using R version 1.9.1 on RedHat Linux, Kernel 2.6.8.
2003 Sep 30
3
fitdistr, mle's and gamma distribution
Dear R Users,
I am trying to obtain a best-fit analytic distribution for a dataset
with 11535459 entries. The data range in value from 1 to 300000000. I
use: fitdistr(data, "gamma") to obtain mle's for the parameters.
I get the following error:
Error in optim(start, mylogfn, x = x, hessian = TRUE, ...) :
non-finite finite-difference value [1]
And the following warnings:
2011 May 03
3
fitting distributions using fitdistr (MASS)
Please guide me through to resolve the error message that I get
this is what i have done.
>x1<- rnorm(100,2,1)
>x1fitbeta<-fitdistr(x1,"beta")
Error in fitdistr(x1, "beta") : 'start' must be a named list
Yes, I do understand that sometime for the distribution to converge to the
given set of data, it requires initial parameters of the distribution, to
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,
2012 Feb 23
3
why is generating the same graph???
Hi,
why my script iss always generating the same graph?when I change the parameters and the name of text file?
library(MASS)
dados<-read.table("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