similar to: Mean of lognormal in base-2

Displaying 20 results from an estimated 4000 matches similar to: "Mean of lognormal in base-2"

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
2010 Jun 21
2
How to predict the mean and variance of the dependent variable after regression
Hi, folks, As seen in the following codes: x1=rlnorm(10) x2=rlnorm(10,mean=2) y=rlnorm(10,mean=10)### Fake dataset linmod=lm(log(y)~log(x1)+log(x2)) After the regression, I would like to know the mean of y. Since log(y) is normal and y is lognormal, I need to know the mean and variance of log(y) first. I tried mean (y) and mean(linmod), but either one is what I want. Any tips? Thanks in
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 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
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
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
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]]
2005 Jan 07
3
lognorm
Hi! I 've a problem to have a lognorm distribution with mean=1 and var (or sigma)=1. rlnorm(1000,0,0) rlnorm(1000,1,1) rlnorm(1000,0,1) .... ? Can you help me?
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
2009 Aug 26
2
Statistical question about logistic regression simulation
Hi R help list I'm simulating logistic regression data with a specified odds ratio (beta) and have a problem/unexpected behaviour that occurs. The datasets includes a lognormal exposure and diseased and healthy subjects. Here is my loop: ors <- vector() for(i in 1:200){ # First, I create a vector with a lognormally distributed exposure: n <- 10000 # number of study subjects
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
2012 Oct 11
2
Help on probability distribution question
Dear All,   I have a questions I would like to ask about and wonder if you have any thoughts to make it work in R.   1. I work in the field of medicine where physiologic variables are often simulated, and they can not have negative values. Most often the assumption is made to simulate this parameters with a normal distribution but in the "log-domain" to avoid from negative values to be
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 =
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 Nov 18
1
How to generate the random numbers with the lognormal distribution?
Hi,R-list! I am a newbie to the R and what I want to know mostly now is as follow: Using "rnorm()",we could get the random numbers with normal distribution, but how to generate the random numbers with the lognormal distribution? Thank you in advance! 仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭guangxing at ict.ac.cn 仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭2005-11-18
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 >=
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
2006 Aug 18
0
Fitting Truncated Lognormal to a truncated data set (was: fitting truncated normal distribution)
Dear List, I am trying to fit Truncated Lognormal to a data set that is 'truncated' from above a certain value, say, 0.01. Below is what I was able to come up with. I would appreciate it if you could review and make any necessary changes. # This is modified off the code for 'dtnorm' of library(msm). dtlnorm <- function (n, mean = 0, sd = 1, lower = -Inf, upper = Inf) {
2005 Jan 11
3
Kolmogorov-Smirnof test for lognormal distribution with estimated parameters
Hello all, Would somebody be kind enough to show me how to do a KS test in R for a lognormal distribution with ESTIMATED parameters. The R function ks.test()says "the parameters specified must be prespecified and not estimated from the data" Is there a way to correct this when one uses estimated data? Regards, Kwabena. -------------------------------------------- Kwabena Adusei-Poku
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