Displaying 20 results from an estimated 900 matches similar to: "lognorm"
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
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
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]]
2009 Feb 11
3
Generating Numbers With Certain Distribution in R
Dear all,
Is there a way to generate K numbers of integer (K = 10^6).
The maximum value of the integer is 200,000 and minimum is 1.
And the occurrences of this integer follows
a lognormal distribution.
- Gundala Viswanath
Jakarta - Indonesia
2013 May 10
1
rlnorm(n, meanlog = 0, sdlog = 1)
Hi list,
Does anyone know the code behind rlnorm(n, meanlog = 0, sdlog = 1)? I am
going to write it in c#.
thanks
Alireza
[[alternative HTML version deleted]]
2008 May 04
1
Is my understanding of rlnorm correct?
rlnorm takes two 'shaping' parameters: meanlog and sdlog.
meanlog would appear from the documentation to be the log of the mean.
eg if the desired mean is 1 then meanlog=0.
So to generate random values that fit a lognormal distribution I would
do this:
rlnorm(N , meanlog = log(mean) , sdlog = log(sd))
But when I check the mean I don't get it when sdlog>0. Interestingly I
2009 May 31
1
Bug in truncgof package?
Dear R-helpers,
I was testing the truncgof CRAN package, found something that looked
like a bug, and did my job: contacted the maintainer. But he did not
reply, so I am resending my query here.
I installed package truncgof and run the example for function ad.test. I
got the following output:
set.seed(123)
treshold <- 10
xc <- rlnorm(100, 2, 2) # complete sample
xt <- xc[xc >=
2003 Jul 25
5
named list 'start' in fitdistr
Hi R lovers!
I'd like to know how to use the parameter 'start' in the function
fitdistr()
obviously I have to provide the initial value of the parameter to optimize
except in the case of a certain set of given distribution
Indeed according to the help file for fitdistr
" For the following named distributions, reasonable starting values
will be computed if `start'
2014 Oct 15
2
Test K-S con distribuciones LogNormales
Hola Ruben,
Sí precisamente es lo que comentas, en matemáticas no se suele llamar
bucketización (este término se emplea más en informática) sino datos
agrupados. Pero la idea es la que tu mismo dices.
Respecto a las gráficas que has puesto, me han aclarado mucho sobre el
tema, gracias.
Si realizo lo mismo, por ejemplo con nbucket=1000 sigo obteniendo un
p-valor de 1. Es decir, que casi le
2007 Oct 03
1
offset in survreg
Hello,
I have a question regarding the use of an offset term with survreg(),
in the Survival library. In particular, I am trying to figure out on
what scale the offset term should be.
Here's a simple example with no censoring and no coefficients:
---------
y = rlnorm(1000, meanlog = 10, sdlog = 2)
delta = rep(1, 1000)
int = rep(1, 1000)
survreg(Surv(y,delta)~offset(10*int), dist =
2010 Jul 13
1
Batch file export
Dear all,
I have a code that generates data vectors within R. For example assume:
z <- rlnorm(1000, meanlog = 0, sdlog = 1)
Every time a vector has been generated I would like to export it into a csv
file. So my idea is something as follows:
for (i in 1:100) {
z <- rlnorm(1000, meanlog = 0, sdlog = 1)
write.csv(z, "c:/z_i.csv")
Where "z_i.csv" is a filename that is
2003 Aug 28
2
ks.test()
Dear All
I am trying to replicate a numerical application (not computed on R) from an
article. Using, ks.test() I computed the exact D value shown in the article
but the p-values I obtain are quite different from the one shown in the
article.
The tests are performed on a sample of 37 values (please see "[0] DATA"
below) for truncated Exponential, Pareto and truncated LogNormal
2003 Apr 09
3
plotting the lognormal density curve
I am trying to plot a lognormal density curve on top of an existing
histogram. Can anybody suggest a simple way to do this? Even if someone
could just explain how to plot a regular normal density curve on top of an
existing histogram, it would be a big help.
Also, is there some way to search through the R-help archives other than
simple browsing?
Thank you so much. Your help and time is greatly
2017 Jul 10
4
fit lognorm to cdf data
Dear all
I am struggling to fit data which form something like CDF by lognorm.
Here are my data:
proc <- c(0.9, 0.84, 0.5, 0.16, 0.1)
size <- c(0.144, 0.172, 0.272, 0.481, 0.583)
plot(size, proc, xlim=c(0,1), ylim=c(0,1))
fit<-nls(proc~SSfpl(size, 1, 0, xmid, scal), start=list(xmid=0.2, scal=.1))
lines(seq(0,1,.01), predict(fit, newdata=data.frame(sito=seq(0,1,.01))), col=2)
I tried
2017 Jul 10
0
fit lognorm to cdf data
* fitdistr?
* it seems unusual (to me) to fit directly to the data with lognormal... fitting a normal to the log of the data seems more in keeping with the assumptions associated with that distribution.
--
Sent from my phone. Please excuse my brevity.
On July 10, 2017 7:27:47 AM PDT, PIKAL Petr <petr.pikal at precheza.cz> wrote:
>Dear all
>
>I am struggling to fit data which form
2012 May 16
3
finding mean and SD for a log-normal distribution
Dear R Expert
allow me to ask a quick qestion: I have a mean value of 6 and a SD of 3 describing my distribution. I would like to "convert" this distribution into a log normal distribution that would best describe it when resimulated using log normal distribution. Currently I am using another software to estimate the respective mean and SD on the log scale and the results are: 1.6667
2017 Jul 10
0
fit lognorm to cdf data
How about
proc <- c(0.9, 0.84, 0.5, 0.16, 0.1)
size <- c(0.144, 0.172, 0.272, 0.481, 0.583)
plot(size, proc, xlim=c(0,1), ylim=c(0,1))
fit<-nls(proc~plnorm(size, log(xmid), sdlog, lower=FALSE), start=list(xmid=0.2, sdlog=.1))
summary(fit)
lines(fitted(fit)~size)
-pd
> On 10 Jul 2017, at 16:27 , PIKAL Petr <petr.pikal at precheza.cz> wrote:
>
> Dear all
>
> I am
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
2017 Jul 11
1
fit lognorm to cdf data
Hi
Great. I did not think that such combination is posssible.
Thanks.
Petr
> -----Original Message-----
> From: peter dalgaard [mailto:pdalgd at gmail.com]
> Sent: Tuesday, July 11, 2017 1:11 AM
> To: PIKAL Petr <petr.pikal at precheza.cz>
> Cc: r-help at r-project.org
> Subject: Re: [R] fit lognorm to cdf data
>
> How about
>
> proc <- c(0.9, 0.84, 0.5,
2013 Oct 31
1
Extracting values from a ecdf (empirical cumulative distribution function) curve
Hi R users,
I am a new user, still learning basics of R. Is there anyway to extract y
(or x) value for a known x (or y) value from ecdf (empirical cumulative
distribution function) curve?
Thanks in advance.
Mano.
[[alternative HTML version deleted]]