Displaying 20 results from an estimated 1000 matches similar to: "fitting distributions with R"
2005 Sep 06
2
(no subject)
my problem actually arised with fitting the data to the weibulldistribution,
where it is hard to see, if the proposed parameterestimates make sense.
data1:2743;4678;21427;6194;10286;1505;12811;2161;6853;2625;14542;694;11491;
?? ?? ?? ?? ?? 14924;28640;17097;2136;5308;3477;91301;11488;3860;64114;14334
how am I supposed to know what starting values i have to take?
i get different
2005 Sep 12
1
fit data with gammadistribution
hello
my data is
data2:2743 4678 21427 6194 10286 1505 12811 2161 6853 2625 14542 694
11491 14924 28640 17097 2136 5308 3477 91301 11488 3860 64114 14334
by calculating
shape<-(mean(data2))^2/var(data2)
scale<-var(data2)/mean(data2)
i get the idea what the parameters of the gammadistribution would be.
but if i try using the method mle() i get stock and i don't know, how to
2005 Dec 03
1
Fit Frechet Distribution
hello everybody
i want to use the maximum likelihood method to estimate FRECHET parameters of
my sample data.
Should it work with fitdistr in the package MASS?
I only find how to do it for GEV, Gumbel, and almost all other distributions,
but FRECHET?
I would be very happy if somebody can tell me how to do fit the FRECHET
distribution!
Thanks
Nadja Riedwyl
2005 Sep 09
2
test for exponential,lognormal and gammadistribution
hello!
i don't want to test my sample data for normality, but exponential- lognormal-
or gammadistribution.
as i've learnt the anderson-darling-test in R is only for normality and i am
not supposed to use the kolmogorov-smirnov test of R for parameter estimates
from sample data, is that true?
can you help me, how to do this anyway!
thank you very much!
nadja
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
2008 May 08
3
MLE for noncentral t distribution
I have a data with 236 observations. After plotting the histogram, I found that it looks like non-central t distribution. I would like to get MLE for mu and df.
I found an example to find MLE for gamma distribution from "fitting distributions with R":
library(stats4) ## loading package stats4
ll<-function(lambda,alfa) {n<-200
x<-x.gam
2006 Dec 30
3
wrapping mle()
Hi,
How can we set the environment for the minuslog function in mle()? The
call in this code fails because the "ll" function cannot find the object
'y'. Modifying from the example in ?mle:
library(stats4)
ll <- function(ymax=15, xhalf=6) {
-sum(stats::dpois(y, lambda=ymax/(1+x/xhalf), log=TRUE))
}
fit.mle <- function(FUN, x, y) {
loglik.fun <- match.fun(FUN)
2008 Oct 09
2
Help MLE
Dear,
I'm starting on R language. I would like some help to implement a MLE
function.
I wish to obtain the variables values (alpha12, w_g12, w_u12) that maximize
the function LL = Y*ln(alpha12 + g*w_g12 + u*w_u12).
Following the code:
rm(list=ls())
ls()
library(stats4)
Model = function(alpha12,w_g12,w_u12)
{
Y = 1
u = 0.5
g = -1
Y*log(alpha12 + g*w_g12 + u*w_u12)
}
res =
2007 Sep 10
1
MLE Function
I am just trying to teach myself how to use the mle function in R because it is much better than what is provided in MATLAB. I am following tutorial material from the internet, however, it gives the following errors, does anybody know what is happening to cause such errors, or does anybody know any better tutorial material on this particular subject.
>
2008 Oct 23
1
distribution fitting
Dear R-help readers,
I am writing to you in order to ask you a few questions about distribution
fitting in R.
I am trying to find out whether the set of event interarrival times that I
am currently analyzing is distributed with a Gamma or General Pareto
distribution. The event arrival granularity is in minutes and interarrival
times are in seconds, so the values I have are 0, 60, 120, 180, and
2006 Jun 02
2
Problem with mle
R 2.3.0
Linux, SuSE 10.0
Hi
I have two problems with mle - probably I am using it the wrong way so
please let me know.
I want to fit different distributions to an observed count of seeds and
in the next step use AIC or BIC 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
2007 Sep 11
1
Fitting Data to a Noncentral Chi-Squared Distribution using MLE
Hi, I have written out the log-likelihood function to fit some data I have (called ONES20) to the non-central chi-squared distribution.
>library(stats4)
>ll<-function(lambda,k){x<-ONES20; 25573*0.5*lambda-25573*log(2)-sum(-x/2)-log((x/lambda)^(0.25*k-0.5))-log(besselI(sqrt(lambda*x),0.5*k-1,expon.scaled=FALSE))}
> est<-mle(minuslog=ll,start=list(lambda=0.05,k=0.006))
2005 Nov 02
5
Distribution fitting problem
I am using the MASS library function
fitdistr(x, dpois, list(lambda=2))
but I get
Error in optim(start, mylogfn, x = x, hessian = TRUE, ...) :
Function cannot be evaluated at initial parameters
In addition: There were 50 or more warnings (use warnings() to see the first
50)
and all the first 50 warnings say
1: non-integer x = 1.452222
etc
Can anyone tell me what I am doing
2024 Apr 15
2
Synthetic Control Method
Good Morning
I want to perform a synthetic control method with R. For this purpose, I
created the following code:
# Re-load packages
library(Synth)
library(readxl)
# Pfadeinstellung Excel-Blatt
excel_file_path <-
("C:\\Users\\xxxxx\\Desktop\\DATA_INVESTMENTVOLUMEN_FOR_R_WITHOUT_NA.xlsx")
# Load the Excel file
INVESTMENTVOLUME <- read_excel(excel_file_path)
#
2007 Mar 11
1
fitting a mixed exponential distribution
Hi all,
I am attempting to fit, and test the goodness of fit of, a mixed
exponential distribution to my dataset which consists of 15minute
rainfall intensity data. FYI, the dataset spanning approx.2 years and
7 rainfall stations consists of some three hundred thousand 15min data
records, of which some 30 thousand are non-zero rainfall amounts.
Could anyone please tell me how i could do
2004 May 13
5
code for functions in base package
Is there any way that I can see the step by step code for functions in
the base package? For instance the dexp function. I am a student
working on writing my own function for something that is similar to
this dexp function and I would like to see the step by step code.
Brittany Laine
GTA WVU Statistics Department
331 Hodges
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:
2002 May 03
6
problems with rexp ?
Does anyone know if R have any problems with the exponential random number
generation (function rexp)?
I comment it because I executed
data<-sort(rexp(100))
plot(data,dexp(data)/(1-pexp(data)),type="l")
and the graphic isn't constant.
(Note: exponential distribution have a constant hazard failure rate).
Thank you,
Juan
2008 Mar 21
1
(no subject)
Hi, I am fairly new to R, and am stuck.
I want to write an R function with argument n that returns a vector of length n with n simulated observations from the double exponential distribution with density: ??g(y) = 1/2e^-y
?
For the double exponential, I want to generate y~Exp(1) and then take ?y with probability 0.5
?
Does anyone know how I can do this in R?
Thanks!
Fran
[[alternative
2006 Jan 20
3
domU Device eth0 does not seem to be present
I can''t find network device in domU.
Debian domU shows
Configuring network interfaces...SIOCSIFADDR: No such device
eth0: ERROR while getting interface flags: No such device
and Fedora domU shows:
eth0: unknown interface: No such device
Dom0 is using Fedora with:
kernel-xen-guest.i686 2.6.15-1.29_FC5 installed
kernel-xen-hypervisor.i686