similar to: Fitting Truncated Lognormal to a truncated data set (was: fitting truncated normal distribution)

Displaying 20 results from an estimated 900 matches similar to: "Fitting Truncated Lognormal to a truncated data set (was: fitting truncated normal distribution)"

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 Oct 14
0
multivariate lognormal distribution simulation in compositions
Dear All,   thanks to Berend, my question posted yesturday was solved succesfully here: http://r.789695.n4.nabble.com/hep-on-arithmetic-covariance-conversion-to-log-covariance-td4646068.html . I posted the question with the assumption of using the results with rlnorm.rplus() from compositions. Unfortunatelly, I am not getting reasonable enough outcome. Am I applying the results wrongfully? The
2004 May 01
2
Generating Lognormal Random variables (PR#6843)
Full_Name: Anthony Gichangi Version: 1.90 OS: Windows XP Pro Submission from: (NULL) (130.225.131.206) The function rlnorm generates negative values for lognormal distribution. x- rlnorm(1000, meanlog = 0.6931472, sdlog = 1) Regards Anthony
2009 May 29
1
Mean of lognormal in base-2
Hi, Does anyone know what the mean value of a lognormal distribution in base-2 is? I am simulating stochastic population growth and if I were working in base-e, I would do:lambda <- 1.1 #multiplicative growth rates <- 0.6 #stochasticity (std. dev)lognormal <- rlnorm(100000, log(lambda) - (s^2)/2, s)## or lognormal <- exp( rnorm( 100000, log(lambda) - (s^2)/2,
2011 Nov 01
1
low sigma in lognormal fit of gamlss
Hi, I'm playing around with gamlss and don't entirely understand the sigma result from an attempted lognormal fit. In the example below, I've created lognormal data with mu=10 and sigma=2. When I try a gamlss fit, I get an estimated mu=9.947 and sigma=0.69 The mu estimate seems in the ballpark, but sigma is very low. I get similar results on repeated trials and with Normal and
2013 Mar 18
2
Fit a mixture of lognormal and normal distributions
Hello I am trying to find an automated way of fitting a mixture of normal and log-normal distributions to data which is clearly bimodal. Here's a simulated example: x.1<-rnorm(6000, 2.4, 0.6)x.2<-rlnorm(10000, 1.3,0.1)X<-c(x.1, x.2) hist(X,100,freq=FALSE, ylim=c(0,1.5))lines(density(x.1), lty=2, lwd=2)lines(density(x.2), lty=2, lwd=2)lines(density(X), lty=4) Currently i am using
2010 Apr 28
0
Truncated Lognormal Distribution
Hi! I have following data which is left truncated say at 10. I am trying to estimate the parameters of the Truncated Lognormal distribution to this data as given below. (I have referred to R code appearing in an earlier post - http://finzi.psych.upenn.edu/Rhelp10/2008-October/176136.html) library(MASS) x <- c(600.62,153.05,70.26,530.42,3440.29,97.45,174.51,168.47, 116.63,36.51, 219.77,
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
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
2008 Jul 23
2
truncated normal
Hi, I want to generate random samples from truncated normal say Normal(0,1)Indicator((0,1),(2,4)). It has more than one intervals. In the library msm, it seems to me that the 'lower' and 'upper' arguments can only be a number. I tried rtnorm(1,mean=0,sd=1, lower=c(0,2),upper=c(1,4)) and it didn't work. Can you tell me how I can do truncated normal at more than one intervals?
2007 Dec 14
1
Truncated normal distribution
I am using TNORM - rtnorm to simulate from a truncated normal distribution. However, the current function available allows us to define the mean and SD of the non-truncated (original) distribution and then run the simulation. http://rss.acs.unt.edu/Rdoc/library/msm/html/tnorm.html I would instead like to define the mean and SD of the non-truncated distribution. Is there a way I can solve for the
2007 Sep 07
1
How to obtain parameters of a mixture model of two lognormal distributions
Dear List, I have read that a lognormal mixture model having a pdf of the form f(x)=w1*f1(x)+(1-w1)*f2(x) fits most data sets quite well, where f1 and f2 are lognormal distributions. Any pointers on how to create a function that would produce the 5 parameters of f(x) would be greatly appreciated. > version _ platform i386-pc-mingw32 arch i386 os
2006 Aug 05
1
AIC for lognormal model
Dear all, I want to compare some different models for a dataset by QQ plots and AIC. I get the following AICs: - linear model: 19759.66 - GAMLSS model: 18702.7 - linear model with lognormal response: -7862.182 The QQ plots show that the lognormal model fits better than the linear model, but still much worse than the GAMLSS. So, in my opinion, the AIC of the lognormal model should be between the
2012 Aug 31
3
fitting lognormal censored data
Hi , I am trying to get some estimator based on lognormal distribution when we have left,interval, and right censored data. Since, there is now avalible pakage in R can help me in this, I had to write my own code using Newton Raphson method which requires first and second derivative of log likelihood but my problem after runing the code is the estimators were too high. with this email ,I provide
2007 Mar 23
1
generating lognormal variables with given correlation
Dear R users I use simulated data to evaluate a model by sampling the parameters in my model from lognormal distributions. I would like these (lognormal distributed) parameters to be correlated, that is, I would like to have pairwise samples of 2 parameters with a given correlation coefficient. I have seen that a covariance matrix can be fixed when generating random variables from a
2010 Dec 27
3
Gamma & Lognormal Model
Dear, I'm very new to R Gui and I have to make an assignment on Gamma Regressions. Surfing on the web doesn't help me very much so i hope this forum may be a step forward. The question sounds as follows: The data set is in the library MASS first install library(MASS) then type data(mammals) attach(mammals) Assignment: Fit the gamma model and lognormal model for the mammals data.
2010 Aug 01
2
Lognormal distribution - Range Factor
Hi, What does it mean to say Lognormal distribution with a mean of 1.03E-6 with a range factor of 100 ? How can I find the lognormal distribution paramters from this information? Thanks, Tims [[alternative HTML version deleted]]
2010 Mar 26
1
Poisson Lognormal
Hi R Users, I'm going to estimate via. ML the parameters in Poisson Lognormal model. The model is: x | lambda ~ Poisson(lambda) lambda ~ Lognormal(a,b) Unfortunately, I haven't found a useful package allowing for such estimation. I tried to use "poilog" package, but there is no equations and it's hard to understand what exactly this package really does. Using it I get the
2002 Dec 10
1
Lognormal distribution
I am trying to fit a lognormal distribution to a set of data and test its goodness of fit with regard to predicted values. I managed to get so far: > y <- c(2,6,2,3,6,7,6,10,11,6,12,9,15,11,15,8,9,12,6,5) > library(MASS) > fitdistr(y,"lognormal",start=list(meanlog=0.1,sdlog=0.1)) meanlog sdlog 1.94810515 0.57091032 (0.12765945) (0.09034437) But I would
2008 Jul 17
0
How to compute loglikelihood of Lognormal distribution
Hi, I am trying to learn lognormal mixture models with EM. I was wondering how does one compute the log likelihood. The current implementation I have is as follows, which perform really bad in learning the mixture models. __BEGIN__ # compute probably density of lognormal. dens <- function(lambda, theta, k){ temp<-NULL meanl=theta[1:k] sdl=theta[(k+1):(2*k)]