[R] Calculation of ratio distribution properties

Mike Lawrence Mike.Lawrence at DAL.CA
Fri May 25 19:24:04 CEST 2007


I came across this reference:
http://www.informaworld.com/smpp/content? 
content=10.1080/03610920600683689

The authors sent me code (attached with permission) in MathCad to  
perform the calculations in which I'm interested. However, I do not  
have MathCad nor experience with its syntax, so I thought I'd send  
the code to the list to see if anyone with more experience with R and  
MathCad would be interested in making this code into a function or  
package of some sort

Mike

Begin forwarded message:

> From: "Noyan Turkkan" <noyan.turkkan at umoncton.ca>
> Date: May 25, 2007 11:09:02 AM ADT
> To: "Mike Lawrence" <Mike.Lawrence at DAL.CA>
> Subject: Rép. : R code for 'Density of the Ratio of Two Normal  
> Random Variables'?
>
> Hi Mike
> I do not know if anyone coded my approach in R. However if you have  
> acces to MathCad, I am including a MathCad file (also in PDF)   
> which computes the density of the ratio of 2 dependent normal  
> variables, its mean & variance. If you do not have acces to  
> MathCad, you will see that all the computations can be easily  
> programmed in R, as I replaced Hypergeometric function by the Erf  
> function. I am not very familiar with R but the erf function may be  
> programmed as : (erf <- function(x)  2*pnorm(x *sqrt(2)) - 1). Good  
> luck.
>
> Noyan Turkkan, ing.
> Professeur titulaire & directeur / Professor & Head
> Dépt. de génie civil / Civil Eng. Dept.
> Faculté d'ingénierie / Faculty of Engineering
> Université de Moncton
> Moncton, N.B., Canada, E1A 3E9
>
>
>
> >>> Mike Lawrence <Mike.Lawrence at DAL.CA> 05/25/07 9:20 am >>>
> Hi Dr. Turkkan,
>
> I am working on a problem that necessitates the estimation of the
> mean and variance of the density of two dependent normal random
> variables and in my search for methods to achieve such estimation I
> came across your paper 'Density of the Ratio of Two Normal Random
> Variables' (2006). I'm not a statistics or math expert by any means,
> but I am quite familiar with the R programming language; do you
> happen to know whether anyone has coded your approach for R yet?
>
> Cheers,
>
> Mike
>
> --
> Mike Lawrence
> Graduate Student, Department of Psychology, Dalhousie University
>
> Website: http://myweb.dal.ca/mc973993
> Public calendar: http://icalx.com/public/informavore/Public
>
> "The road to wisdom? Well, it's plain and simple to express:
> Err and err and err again, but less and less and less."
> - Piet Hein
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Ratio2depNV.pdf
Type: application/pdf
Size: 44278 bytes
Desc: not available
Url : https://stat.ethz.ch/pipermail/r-help/attachments/20070525/d0f035e6/attachment.pdf 
-------------- next part --------------

--
Mike Lawrence
Graduate Student, Department of Psychology, Dalhousie University

Website: http://myweb.dal.ca/mc973993
Public calendar: http://icalx.com/public/informavore/Public

"The road to wisdom? Well, it's plain and simple to express:
Err and err and err again, but less and less and less."
	- Piet Hein




More information about the R-help mailing list