Re: [R] Bivariate lognormal distribution

From: Kjetil Brinchmann Halvorsen <kjetil_at_acelerate.com>
Date: Sun 27 Mar 2005 - 04:58:24 EST

Vicky Landsman wrote:

>
> Thanks to Prof. Ripley, Kjetil and Spencer Graves for help.
> I will be more specific.
> I have to simulate a bivariate lognormal pair (Y1,Y0) where E(Y1)=X'b,
> E(Y0)=X'd, Var(Y1)=c1, Var(Y0)=c0,
> X is a data matrix, and b and d are vectors of parameters.
> Vicky.

You did'nt specify the dependence!

Kjetil

>
>
> ----- Original Message ----- From: "Spencer Graves"
> <spencer.graves@pdf.com>
> To: "Prof Brian Ripley" <ripley@stats.ox.ac.uk>
> Cc: "Vicky Landsman" <msvika@mscc.huji.ac.il>; "R-help list"
> <R-help@stat.math.ethz.ch>
> Sent: Friday, March 25, 2005 4:40 PM
> Subject: Re: [R] Bivariate lognormal distribution
>
>
>>
>> I hope Professor Ripley will correct me if I'm mistaken, but the
>> documentation for "mvrnorm" in library(MASS) says it will, "Simulate
>> from a Multivariate Normal Distribution". If you want the density
>> function or probabilities or quantiles, you can get those from
>> library(mvtnorm).
>> Just for completeness, to use normal for a lognormal, you need
>> to take the logarithms of your number (which must be all positive;
>> zeros and negative numbers become NA), then compute mean vector and
>> variance matrix of the logs, compute probabilities on the log scale,
>> then back transform by exponentiating to get the results back into
>> the original scale.
>> hope this helps. spencer graves
>>
>> Prof Brian Ripley wrote:
>>
>>> On Thu, 24 Mar 2005, Vicky Landsman wrote:
>>>
>>>> Is there a package that enables to create the bivariate log-normal
>>>> variables?
>>>
>>>
>>>
>>> Just exponentiate each of a bivariate normal pair. You can get the
>>> latter from mvrnorm in package MASS.
>>>
>>
>
> ______________________________________________
> R-help@stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide!
> http://www.R-project.org/posting-guide.html
>
>
>

-- 

Kjetil Halvorsen.

Peace is the most effective weapon of mass construction.
               --  Mahdi Elmandjra





-- 
No virus found in this outgoing message.
Checked by AVG Anti-Virus.

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Received on Sun Mar 27 09:44:20 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:30:56 EST