[R] Calculation of ratio distribution properties

Mike Lawrence Mike.Lawrence at DAL.CA
Fri May 25 19:29:31 CEST 2007


MathCad code failed to attach last time. Here it is.

-------------- next part --------------
On 25-May-07, at 2:24 PM, Mike Lawrence wrote:

> 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
>>
>> <Ratio2depNV.pdf>
>
> --
> 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.

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