similar to: Rmix package and different distributions

Displaying 20 results from an estimated 1100 matches similar to: "Rmix package and different distributions"

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
2006 Jun 23
1
How to use mle or similar with integrate?
Hi I have the following formula (I hope it is clear - if no, I can try to do better the next time) h(x, a, b) = integral(0 to pi/2) ( ( integral(D/sin(alpha) to Inf) ( ( f(x, a, b) ) dx ) dalpha ) and I want to do an mle with it. I know how to use mle() and I also know about integrate(). My problem is to give the parameter values a and b to the
2005 Jan 10
1
mle() and with()
I'm trying to figure out the best way of fitting the same negative log-likelihood function to more than one set of data, using mle() from the stats4 package. Here's what I would have thought would work: -------------- library(stats4) ## simulate values r = rnorm(1000,mean=2) ## very basic neg. log likelihood function mll <- function(mu,logsigma) {
2007 Nov 19
1
Finding proportion of observations that are outliers from the left tail of the normal distribution
Hi fellow users I have a new R problem i am hoping to get some pointers on. I have a dataset that is approximately normally distributed but with a fat left tail. I am interested in a good measurement on how much fatter the left tail is than can be expected from a normal distribution. One thing I'll tried was fitting a two component mixture model with the Rmix package but i am also interested
2005 Sep 06
2
fitting distributions with R
Dear all I've got the dataset data:2743;4678;21427;6194;10286;1505;12811;2161;6853;2625;14542;694;11491; ?? ?? ?? ?? ?? 14924;28640;17097;2136;5308;3477;91301;11488;3860;64114;14334 I know from other testing that it should be possible to fit the data with the exponentialdistribution. I tried to get parameterestimates for the exponentialdistribution with R, but as the values of the parameter
2006 Jan 19
1
nls profiling with algorithm="port" may violate bounds (PR#8508)
[posted to R-devel, no discussion: resubmitting it as a bug, just so it gets logged appropriately] Sorry to report further difficulties with nls and profiling and constraints ... the problem this time (which I didn't check for in my last round of testing) is that the nls profiler doesn't seem to respect constraints that have been set when using the port algorithm. See test code
2012 Jul 05
3
Maximum Likelihood Estimation Poisson distribution mle {stats4}
Hi everyone! I am using the mle {stats4} to estimate the parameters of distributions by MLE method. I have a problem with the examples they provided with the mle{stats4} html files. Please check the example and my question below! *Here is the mle html help file * http://stat.ethz.ch/R-manual/R-devel/library/stats4/html/mle.html http://stat.ethz.ch/R-manual/R-devel/library/stats4/html/mle.html
2007 Apr 09
1
R:Maximum likelihood estimation using BHHH and BFGS
Dear R users, I am new to R. I would like to find *maximum likelihood estimators for psi and alpha* based on the following *log likelihood function*, c is consumption data comprising 148 entries: fn<-function(c,psi,alpha) { s1<-sum(for(i in 1:n){(c[i]-(psi^(-1/alpha)*(lag(c[i],-1))))^2* (lag(c[i],-1)^((-2)*(alpha+1)) )}); s2<- sum(for(m in 1:n){log(lag(c[m],-1)^(((2)*alpha)+2))});
2008 Sep 04
1
pass data to log-likelihood function
Hi there, When I do bootstrap on a maximum likelihood estimation, I try the following code, however, I get error: Error in minuslogl(alpha = 0, beta = 0) : object "x" not found It seems that mle() only get data from workspace, other than the boot.fun(). My question is how to pass the data to mle() in my case. I really appreciated to any suggestions. Best wishes, Jinsong
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
2004 Jul 14
1
Running the optimization on the subset of parameters
Dear all, I'd like to find a minimum of (-loglik) function which is a function of k parameters. I'd like to run the minimization algorithm for the different subsets of the parameters and assign the fixed values to the complementary subset. How should I define my (-loglik) function such that it can be passed to the optim or other optimization function? Much thanks for any suggestions.
2005 Jul 21
1
About object of class mle returned by user defined functions
Hi, There is something I don't get with object of class "mle" returned by a function I wrote. More precisely it's about the behaviour of method "confint" and "profile" applied to these object. I've written a short function (see below) whose arguments are: 1) A univariate sample (arising from a gamma, log-normal or whatever). 2) A character string
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
2011 May 23
6
Reading Data from mle into excel?
Hi there, I ran the following code: vols=read.csv(file="C:/Documents and Settings/Hugh/My Documents/PhD/Swaption vols.csv" , header=TRUE, sep=",") X<-ts(vols[,2]) #X dcOU<-function(x,t,x0,theta,log=FALSE){ Ex<-theta[1]/theta[2]+(x0-theta[1]/theta[2])*exp(-theta[2]*t) Vx<-theta[3]^2*(1-exp(-2*theta[2]*t))/(2*theta[2]) dnorm(x,mean=Ex,sd=sqrt(Vx),log=log) }
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
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
2011 Sep 06
2
Generalizing call to function
Hello guys, I would like to ask for help to understand what is going on in "func2". My plan is to generalize "func1", so that are expected same results in "func2" as in "func1". Executing "func1" returns... 0.25 with absolute error < 8.4e-05 But for "func2" I get... Error in dpois(1, 0.1, 23.3065168689948, 0.000429064542600244,
2004 Dec 09
2
wishlist -- names gives slotnames (PR#7410)
Full_Name: Elizabeth Purdom Version: 1.9.1 OS: Windows XP Submission from: (NULL) (171.64.102.199) It would be nice if names(obj) would give slot names as well. Since for many people slots are new, the first thing that happens is you try to access what's in them and can't find how to do it. If you don't know that slotNames() exists, it can be very frustrating. Moreover, if you
2008 Mar 11
1
messages from mle function
Dears useRs, I am using the mle function but this gives me the follow erros that I don't understand. Perhaps there is someone that can help me. thank you for you atention. Bernardo. > erizo <- read.csv("Datos_Stokes_1.csv", header = TRUE) > head(erizo) EDAD TALLA 1 0 7.7 2 1 14.5 3 1 16.9 4 1 13.2 5 1 24.4 6 1 22.5 > TAN <-