Re: [R] Calculation of ratio distribution properties

From: Mike Lawrence <Mike.Lawrence_at_dal.ca>
Date: Fri, 25 May 2007 14:24:04 -0300

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
>

--
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



______________________________________________ R-help_at_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 and provide commented, minimal, self-contained, reproducible code.

Received on Fri 25 May 2007 - 17:32:48 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Fri 25 May 2007 - 18:31:25 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.