mahesh samtani
2011-Jan-02 15:08 UTC
[R] How to compute the density of a variable that follows a proportional error distribution
Hello, I am trying to compute the density of a variable k that is either (1) Normally distributed; (2) Log-Normally distributed; or (3) follows proportional error distribution. I tried to search R-help and the answer for normal distribution was easy to find (please see 1c). I am not sure if my formula for dlnorm is correct (please see 2c below)? I really don't know what function to use for the density of k with a proportional error distribution. Please help, Mahesh 1. Normal distribution: *a) *k=qk+h, hÎN(0, w) *b) *then kÎN(qk, w) *c) *density of a variable k: dnorm(x,mean=qk,sd=w,log=FALSE) #x: vector of quantiles 2. Log-Normal distribution: *a) *k=qk exp(h), hÎN(0, w) *b) *then kÎLN(qk, w) *c) *density of a variable k: dlnorm(x,meanlog=log(qk),sdlog=w,log=FALSE) *# Is sdlog correct?????* ** 3. Proportional Error distribution *a) *k=qk (1+h), hÎN(0, w) *???? * [[alternative HTML version deleted]]
mahesh samtani
2011-Jan-03 15:44 UTC
[R] How to compute the density of a variable that follows a proportional error distribution
Hello, Please accept my apologies; the symbols from my earlier message did not make it through correctly on the mailing list. Here is my question again: I am trying to compute the density of a variable k that is either (1) Normally distributed; (2) Log-Normally distributed; or (3) follows proportional error distribution. I tried to search R-help and the answer for normal distribution was easy to find (please see Bullet a below). I am not sure if my formula for sdlog is correct for dlnorm (please bullet b below)? I really don't know what function to use for the density of k with a proportional error distribution (please bullet c). Please help…Mahesh a) Normal distribution: k = theta+eta, k is a random variable; eta is normally distributed with mean 0 & sd of omega while theta is a constant Density of k is given by: dnorm(x, mean = theta, sd = omega, log = FALSE) #x is vector of quantiles b) Log-Normal distribution: k= theta*exp(eta), k is a random variable; eta is normally distributed with mean 0 & sd of omega while theta is a constant Density of k is given by: dlnorm(x, meanlog = log(theta), sdlog = omega, log = FALSE) #### Is sdlog correct??? c) Proportional Error distribution k=theta*(1+eta), k is a random variable; eta is normally distributed with mean 0 & sd of omega while theta is a constant Density of k is given by: ??? I am aware of the density function in R, but is it possible to define of density of k with a proportional error distribution in terms of theta and omega? On Sun, Jan 2, 2011 at 10:08 AM, mahesh samtani <msamtani@gmail.com> wrote:> Hello, > I am trying to compute the density of a variable k that is either (1) > Normally distributed; (2) Log-Normally distributed; or (3) follows > proportional error distribution. I tried to search R-help and the answer for > normal distribution was easy to find (please see 1c). I am not sure if my > formula for dlnorm is correct (please see 2c below)? I really don't know > what function to use for the density of k with a proportional error > distribution. > > Please help, > Mahesh > > > 1. Normal distribution: > > *a) *k=qk+h, hÎN(0, w) > > *b) *then kÎN(qk, w) > > *c) *density of a variable k: dnorm(x,mean=qk,sd=w,log=FALSE) #x: > vector of quantiles > > > > 2. Log-Normal distribution: > > *a) *k=qk exp(h), hÎN(0, w) > > *b) *then kÎLN(qk, w) > > *c) *density of a variable k: dlnorm(x,meanlog=log(qk),sdlog=w,log=FALSE) > *# Is sdlog correct?????* > > ** > > 3. Proportional Error distribution > > *a) *k=qk (1+h), hÎN(0, w) > > *???? * > > > > >[[alternative HTML version deleted]]