similar to: Fitting Beta Distribution

Displaying 20 results from an estimated 100 matches similar to: "Fitting Beta Distribution"

2017 Dec 21
0
Fitting Beta Distribution
I answer my own question: I had overlooked the fact that the normalization factor is also a function of the parameters I want to optimise, hence I should write dbeta2 <- function(x, shape){ res <- x^(shape-1)*(1-x)^(shape-1)/beta(shape, shape) return(res) } after which the results are consistent. ---------- Forwarded message ---------- From: Lorenzo Isella <lorenzo.isella
2012 May 13
2
Discrete choice model maximum likelihood estimation
Hello, I am new to R and I am trying to estimate a discrete model with three choices. I am stuck at a point and cannot find a solution. I have probability functions for occurrence of these choices, and then I build the likelihood functions associated to these choices and finally I build the general log-likelihood function. There are four parameters in the model, three of them are associated to
2012 May 13
1
how to write data using xlsReadWrite
Hai I'm Dee. I'm trying to write var data from these codes inside excel file. My directory to store the data is *D:\FYP\image* . these are my codes, can you help give an advice or idea with my problem: l*ibrary("biOps") library("waveslim") library("xlsReadWrite") x <- readTiff("D:\\FYP\\image\\SignatureImage\\user186g1.tif") y <-
2012 May 13
4
write data using xlsReadWrite
Hai, I'm trying to write these var output data from these codes inside excel file. My directory to store the data is /D:\FYP\image / but receive an error message : /Error in write.xls(mydata, "D:\\FYP\\image.mydata.xls") : object 'mydata' not found/ these are my codes, can you help give an advice or idea with my problem: /library("biOps")
2003 Mar 17
2
scoping rules; summary
Hi everyone thanks for the replies. The issue was NOT a font problem; I deliberately chose ll1 and l11 as examples of easily confused variable names (evidently these were too easily confused ;-). The code snippet was written as intended, and increment() contained a deliberate, highlighted, bug. I was asking for guidance on avoiding/finding this sort of coding error. That was why I wrote
2003 Mar 17
1
scoping rules
Hi I recently found a bug that was isomorphic to the following: ll1 <- 2 increment <- function(x) { l11 <- 1 return(x+ll1) #bug here } Of course, R is obeying the scoping rules just fine, but I'm evidently not setting the do.what.I.mean.not.what.I.say variable correctly. Now, how do I avoid making this type of error? ... and what is the best tool for tracking it down? --
2006 Mar 27
1
Missing Argument in optim()
Hello everybody, i already searched the archieves, but i still don't know what is wrong in my implementation, mybe anybody coud give me some advice ll1<-function(rho,theta,beta1,beta2,beta3,beta4,t,Szenariosw5,Testfaellew5,X1,X2) { n<-length(t) t<-cumsum(t) tn<-t[length(t)] Szenn<-Szenariosw5[length(Szenariosw5)]
2006 Jan 25
0
Log-Likelihood 3d-plot and contourplot / optim() starting values
Hello, i have coded the following loglikelihood-function # Log-Likelihood-Funktion loglik_jm<-function(N,phi,t) { n<-length(t) i<-seq(along=t) s1<-sum(log(N-(i-1))) s2<-phi*sum((N-(i-1))*t[i]) n*log(phi)+s1-s2 } # the data t<-c(7,11,8,10,15,22,20,25,28,35) # now i want to do a 3d-plot and a contourplot in order to see at which values of N and phi the loglikelihood
2012 Oct 29
0
why isn't integrate function working in a likelihood
Dear R users, I have been trying to solve for mle's of a function that involves an integral and I keep getting an error. I created an example to work on first and even the simple example doesn't give me the mle's. I am getting the error "Error in integrate(integrand, 0, Inf) : non-finite function value". I divided my likelihood function into two parts, one part involves
2006 Jan 14
1
Different length of objects
Hello, i got an warning message in the following code: f<-1:100 t<-1:100 b<-100 ll2 <- function(b,f,t) { t<-cumsum(t) tn<-t[length(t)] i<-seq(along=f) s1<-(tn*exp(-b*tn)*sum(f[i]))/(1-exp(-b*tn)) s2<-sum((f[i]*(t[i]*exp(-b*t[i])-t[i-1]*exp(b*t[i-1])))/(exp(-b*t[i-1])-exp(-b*t[i]))) s1-s2 } ll2(b,f,t) i think, the problem here is, that t[0] doesn't
1997 Jul 24
0
Security hole in mgetty+sendfax
-----BEGIN PGP SIGNED MESSAGE----- Hi, a security hole has been found in the auxiliary fax scripts "faxq" and "faxrunq" in the mgetty+sendfax package. It has been in there since the first day those scripts were written. Due to improper quoting in these shell scripts, it''s possible to execute code with a foreign user id, and get root access to the machine. The
2003 Nov 10
5
Subsetting a list of vectors
Hi, I'm trying to subset a list which contains variable length vectors. What I want to do is extract (eg.) the 3rd item in each vector (with length >= 3). At the moment I'm using sapply(list.of.vectors, function(x) {x[3]}). The problem with this is that sapply returns a list of the same length of list.of.vectors so I end up with a whole lot of null entries from those vectors
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. >
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
2002 Apr 12
1
Parrot
This is just an idea for comment. Perl6, the upcoming version of Perl has separated out the runtime into a virtual machine called Parrot. There are already several small languages (one is C-like, one is Java-like and one is BASIC-like) that target Parrot and given the popularity of Perl its likely that others may attempt to target it too. If R could interface easily with Parrot then it might be
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
2012 Mar 15
2
Integrate inside function
Dear R users, first I take this opportunity to greet all the R community for your continuous efforts. I wrote a function to calculate the pdf and cdf of a custom distribution (mixed gamma model). The function is the following: pmixedgamma3 <- function(y, shape1, rate1, shape2, rate2, prev) { density.function<-function(x) { shape1=shape1 rate1=rate1 shape2=shape2
2011 Aug 01
3
Beta fit returns NaNs
Hi, sorry for repeating the question but this is kind of important to me and i don't know whom should i ask. So as noted before when I do a parameter fit to the beta distr i get: fitdist(vectNorm,"beta"); Fitting of the distribution ' beta ' by maximum likelihood Parameters: estimate Std. Error shape1 2.148779 0.1458042 shape2 810.067515 61.8608126 Warning
2018 Jul 12
2
Problemas con la funcion "apply"
Buenos dias! Os escribo para ver si me podeis ayudar con un asunto en el que me he quedado un poco encallado. Lo que tengo que hacer es sacar los percentiles (0.001, 0.005, 0.95 y 0.999) de varias distribuciones beta, concretamente 418. Cada distribucion esta definida por los parametros "shape1" y "shape2". Por lo tanto tengo una base de datos de 418 filas y en cada una de
2012 Aug 27
3
How to generate a matrix of Beta or Binomial distribution
Hi folks, I have a question about how to efficiently produce random numbers from Beta and Binomial distributions. For Beta distribution, suppose we have two shape vectors shape1 and shape2. I hope to generate a 10000 x 2 matrix X whose i th rwo is a sample from reta(2,shape1[i]mshape2[i]). Of course this can be done via loops: for(i in 1:10000) { X[i,]=rbeta(2,shape1[i],shape2[i]) } However,