similar to: plotting the lognormal density curve

Displaying 20 results from an estimated 2000 matches similar to: "plotting the lognormal density curve"

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
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
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
2005 Jun 29
2
MLE with optim
Hello, I tried to fit a lognormal distribution by using optim. But sadly the output seems to be incorrect. Who can tell me where the "bug" is? test = rlnorm(100,5,3) logL = function(parm, x,...) -sum(log(dlnorm(x,parm,...))) start = list(meanlog=5, sdlog=3) optim(start,logL,x=test)$par Carsten. [[alternative HTML version deleted]]
2012 Aug 29
2
Estimation parameters of lognormal censored data
Hi, I am trying to get the maximum likelihood estimator for lognormal distribution with censored data;when we have left, interval and right censord. I built my code in R, by writing the deriving of log likelihood function and using newton raphson method but my estimators were too high " overestimation", where the values exceed the 1000 in some runing of my code. is there any one can
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
2002 Jul 12
1
Minor bug in dlnorm (PR#1781)
The density of a lognormal should be 0 for negative arguments, but > dlnorm(-1) [1] NaN Warning message: NaNs produced in: dlnorm(x, meanlog, sdlog, log) A simple fix is to change dlnorm's definition to: function (x, meanlog = 0, sdlog = 1, log = FALSE) .Internal(dlnorm(x*(x>0), meanlog, sdlog, log)) It might be faster to put the same sort of adjustment into the internal code, but
2005 Jan 31
2
ML-Fit for truncated distributions
Hello, maybe that my Question is a "beginner"-Question, but up to now, my research didn't bring any useful result. I'm trying to fit a distribution (e.g. lognormal) to a given set of data (ML-Estimation). I KNOW about my data that there is a truncation for all data below a well known threshold. Is there an R-solution for an ML-estimation for this kind of data-problem? As
2007 Nov 14
2
Generating log transformed random numbers
Dear R users, My question is that how it is possible to generate some random numbers using rnorm( ) function but in log transformed values. Thank you, Tobias --------------------------------- [[alternative HTML version deleted]]
2003 Aug 05
1
error message in fitdistr
Hi R lovers Here is a numerical vector test > test [1] 206 53 124 112 92 77 118 75 48 176 90 74 107 126 99 84 114 147 99 114 99 84 99 99 99 99 99 104 1 159 100 53 [33] 132 82 85 106 136 99 110 82 99 99 89 107 99 68 130 99 99 110 99 95 153 93 136 51 103 95 99 72 99 50 110 37 [65] 102 104 92 90 94 99 76 81 109 91 98 96 104 104 93 99 125 89
2005 Mar 12
1
MLE for two random variables
Hello, I've the following setting: (1) Data from a source without truncation (x) (2) Data from an other source with left-truncation at threshold u (xu) I have to fit a model on these these two sources, thereby I assume that both are "drawn" from the same distribution (eg lognormal). In a MLE I would sum the densities and maximize. The R-Function could be:
2012 May 22
4
Need to help to get value for bigger calculation
Hello R-Experts, I want to calculate values like 15^200 or 17^300 in R. In normal case it can calculate the small values of b (a^b). I have fixed width = 10000 and digits = 22 but still answers are Inf. How to deal the cases like these? Thanks in advance. Regards, rehena [[alternative HTML version deleted]]
2009 Apr 04
2
threshold distribution
Dear ALL I have a list of data below 0.80010 0.72299 0.69893 0.99597 0.89200 0.69312 0.73613 1.13559 0.85009 0.85804 0.73324 1.04826 0.84002 1.76330 0.71980 0.89416 0.89450 0.98670 0.83571 0.73833 0.66549 0.93641 0.80418 0.95285 0.76876 0.82588 1.09394 1.00195 1.14976 0.80008 1.11947 1.09484 0.81494 0.68696 0.82364 0.84390 0.71402 0.80293 1.02873 all of them are ninty. Nowaday, i try to find a
2009 Apr 28
3
truehist and density plots
Hi, I wanted to plot the histogram of a vector and then, plot the density function of subsets of the vector on the histogram. So I use truehist in MASS package and lines(density) as follows: length(b) = 1000 truehist(b) lines(density(b[1:100])) however the density plot of the first 100 points exceeds the max of y axis (see attached). how is it possible to make a graphics so that the density plot
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,
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.
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
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 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]]
2009 Jan 16
3
Fitting of lognormal distribution to lower tail experimental data
Hi, I am beginner with R and need firm guidance with my problem. I have seen some other threads discussing the subject of right censored data, but I am not sure whether or not this problem can be regarded as such. Data: I have a vector with laboratory test data (strength of wood specimens, example attached as txt-file). This data is the full sample. It is a common view that this kind of data