Displaying 20 results from an estimated 11000 matches similar to: "Warnings in fitdistr() from MASS."
2010 Jan 12
1
Strange behavior when trying to piggyback off of "fitdistr"
Hello.
I am not certain even how to search the archives for this particular question, so if there is an obvious answer, please smack me with a large halibut and send me to the URLs.
I have been experimenting with fitting curves by using both maximum likelihood and maximum spacing estimation techniques. Originally, I have been writing distribution-specific functions in 'R' which work
2008 Sep 22
1
R-help Digest, Vol 67, Issue 23
Warranty on Accuracy, Precision, Legality, ... of R in Research
(These questions may well have been raised.)
What is the implied warranty of using R for research & publications, consulting, etc.?
Alternately, how does one obtain such a warranty?
Your answers will be much appreciated.
Perhaps you can point me to some websites which discussed this subject in the past.
Thanks & regards
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
2004 Oct 27
1
Warning messages in function fitdistr (library:MASS)
Why the warning messages (2:4)?
> x <- rexp(1000,0.2)
> fitdistr(x,"exponential",list(rate=1))
      rate    
  0.219824219 
 (0.006951308)
Warning messages: 
1: one-diml optimization by Nelder-Mead is unreliable: use optimize in: optim(start, mylogfn, x = x, hessian = TRUE, ...) 
2: NaNs produced in: dexp(x, 1/rate, log) 
3: NaNs produced in: dexp(x, 1/rate, log) 
4: NaNs
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))
2008 Sep 19
0
Re lative Novice ? "Can I get some explanation of the docs for fitdistr(MASS)?"
In the docs I see:
Usage
fitdistr(x, densfun, start, ...)
Arguments
x A numeric vector.  
densfun Either a character string or a function returning a density
evaluated at its first argument. 
Distributions "beta", "cauchy", "chi-squared", "exponential", "f", "gamma",
"geometric", "log-normal", "lognormal",
2008 Sep 22
0
Re lative novice: Working with fitdistr(MASS): 3 questions
OK, I am now at the point where I can use fitdistr to obtain a fit of one of
the standard distributions to mydata.
It is quite remarkable how different the parameters are for different
samples through from the same system.  Clearly the system itself is not
stationary.
Anyway, question 1:  I require a visual perspective of the fit I get.  I can
use hist.scott to get a hisogram (and just have to
2003 Nov 27
2
MASS fitdistr()
Dear R experts,
I am trying to use the R MASS library fitdistr() to fit the following
list:
k21stsList<-c(0.76697,0.57642,0.75938,0.82616,0.93706,0.77377,0.58923,0.37157,0.60796,1.00070,0.97529,0.62858,0.63504,0.68697,0.61714,0.75227,1.16390,0.66702,0.83578)
as follows,
library(MASS)
fitdistr(k21stsList, "normal")
But, I get
Error in fitdistr(k21stsList, "normal") :
2008 Oct 30
1
Is possible, on biological grounds, suggest to fitdistr (MASS library) that the estimated parameters must be between two values?
Sorry if it is a silly question, I haven't found documentation on this and I
don't know if it is possible.
library(MASS) ## for fitdistr 
library(msm) ## for dtnorm 
#prepare truncated normal distribution
dtnorm0 <- function(x, mean, sd , log = FALSE) { 
   dtnorm(x, mean, sd, 105, 135, log) 
} 
set.seed(1) 
#Generate normal distribution with the TRUE population mean (day 106 of the
2010 Jan 03
6
Help with function "fitdistr" in "MASS"
Hi, R users:
I want to fit my data into a normal distribution by using the command
"fitdistr" in "MASS".
I changed my data class from "ts" to "numeric" by
>class(mydata)="numeric"
but after using "fitdistr", I got the result below
>fitdistr(mydata,"normal")
  mean    sd 
  NA     NA  
 (NA)   (NA) 
the help doc of
2011 Apr 23
0
MASS fitdistr call in plyr help!
I have a set of wind speeds read at different locations.  The data is
a data frame with two columns: site and wind speed.  I want to split
the data on site and call a function to find the shape and scale
parameters of a weibull distribution fit.
The end result is a plot with x-axis = shape and y-axis = scale.
Currently my code looks like:
  fit_wind_speed<-function(x){
   
2005 Apr 05
1
Fitdistr and likelihood
Hi all,
I'm using the function "fitdistr" (library MASS) to fit a distribution to
given data.
What I have to do further, is getting the log-Likelihood-Value from this
estimation.
Is there any simple possibility to realize it?
Regards, Carsten
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)
2002 Jan 29
1
fitdistr() in MASS library
Prof Brian Ripley wrote:
>
> Even better, use the function fitdistr in package MASS...
>
I had a look in my MASS library (from the package VR_6.2-6) and couldn't
find this function. Is there a newer version available? Thanks for any
help.
Jim
This email message and any accompanying attachments may contain confidential information.  If you are not the intended recipient, do not
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:
2003 Jun 05
1
dev.copy2eps: Why did the colors come into my postscript output?
On a RedHat 7.3 system with R-1.6.1, I did this
 > x11(width=3.5,height=4,colortype="gray")
Then plotted (with matplot) a nice looking no-color graph on the screen, 
then I did this:
 > dev.copy2eps(file="test.eps",height=4,width=3.5)
I was surprised that the output in the eps file included the colored 
lines from the plot, even though the screen device was set to
2004 Feb 17
2
problem with fitdistr ?
Hi,
I'm trying fitdistr but I'm getting some errors
> fitdistr(rnorm(100),"Normal")
Error in fitdistr(rnorm(100), "Normal") : 'start' must be a named list
> fitdistr(rnorm(100),"Normal",start=list(mean=0,sd=1))
Error in fitdistr(rnorm(100), "Normal", start = list(mean = 0, sd = 1))
:
        supplying pars for the Normal is not
2008 Feb 10
1
Error while using fitdistr() function or goodfit() function
Try changing your method to "ML" and try again. I tried the run the
first example from the documentation and it failed with the same error.
Changing the estimation method to ML worked.
@List: Can anyone else verify the error I got? I literally ran the
following two lines interactively from the example for goodfit:
dummy <- rnbinom(200, size = 1.5, prob = 0.8)
gf <- goodfit(dummy,
2007 Sep 09
1
fitdistr()
I am trying to fit the chi-squared distribution to a set of data using the fitdistr function found in the MASS4 library, the data set is called ONES3, I have loaded it using the command
   
  ONES3<-read.table("ONES3.pdf",header=TRUE,na="NA")
   
  I print out the dataset ONES3 to the screen to make sure it has loaded
   
  Then I try to fit this data using the command
2003 Jul 04
1
Problem with fitdistr for beta
I have the following problem:
I have a vector x of data (0<x<=1 ) with
a U-shaped histogram and try to fit a beta
distribution using  fitdistr. In fact,
hist(rbeta(100,0.1,0.1)) looks a lot like
my data.
The equivalent to
the example in the manual
sometimes work:
> a <- rbeta(100,0.1,0.1)
> fitdistr(x=a, "beta", start=list(shape1=0.1,shape2=0.1))1)
>      shape1