[R] variance of combinations of means - off topic

2005-01-05 Thread Bill Shipley
Hello, and please excuse this off-topic question, but I have not been able to find an answer elsewhere. Consider a value Z that is calculated using the product (or ratio) of two means X_mean and Y_mean: Z=X_mean*Y_mean. More generally, Z=f(X_mean, Y_mean). The standard error of Z will be a funct

RE: [R] variance of combinations of means - off topic

2005-01-05 Thread Liaw, Andy
You could try googling for "delta method". I believe MASS even has code for that... Andy > From: Bill Shipley > > Hello, and please excuse this off-topic question, but I have not been > able to find an answer elsewhere. Consider a value Z that is > calculated > using the product (or ratio) of

Re: [R] variance of combinations of means - off topic

2005-01-05 Thread Spencer Graves
I know two standard ways to approach this. The traditional approximation is called the "delta method"; it uses a Taylor series approximation, usually of first order but could be higher. Googling for "delta method" produced several useful hits just now. The second method is Monte Carlo.

Re: [R] variance of combinations of means - off topic

2005-01-05 Thread Spencer Graves
Hi, Andy: MASS4 has section 5.7 "Bootstrap and Permutation Methods". Is this what you are suggesting? It certainly is relevant to the question (but not to the "delta method", except as a means of checking on it). Thanks, spencer graves Liaw, Andy wrote: You could try googling

RE: [R] variance of combinations of means - off topic

2005-01-05 Thread Liaw, Andy
What I have in mind is the discussion on pp. 167-172 of `S Programming'. Cheers, Andy > From: Spencer Graves > > Hi, Andy: > > MASS4 has section 5.7 "Bootstrap and Permutation Methods". Is > this what you are suggesting? It certainly is relevant to > the question > (but not to the "

Re: [R] variance of combinations of means - off topic

2005-01-05 Thread Kjetil Brinchmann Halvorsen
Liaw, Andy wrote: You could try googling for "delta method". I believe MASS even has code for that... Andy If you have the original data you can bootstrap --- else you need the standar errors and correlation between the means, and can use the delta methos as above. You could even use D or der

Re: [R] variance of combinations of means - off topic

2005-01-05 Thread Kjetil Brinchmann Halvorsen
Liaw, Andy wrote: You could try googling for "delta method". I believe MASS even has code for that... Andy also, help.search("delta") does give nothing usefull, so if it is in MASS it would be hidden, and need a \concept entry in the .Rd file. The delta method is really nothimg more (or less)

Re: [R] variance of combinations of means - off topic

2005-01-05 Thread Andrew Robinson
Bill, P. 146 of Casella and Berger's "Statistical Inference" 1990 starts a section on bivariate transformations. Andrew -- Andrew Robinson Ph: 208 885 7115 Department of Forest Resources Fa: 208 885 6226 University of Idaho E : [EMAIL PROTECTED] PO Box

Re: [R] variance of combinations of means - off topic

2005-01-06 Thread Thomas Lumley
On Wed, 5 Jan 2005, Kjetil Brinchmann Halvorsen wrote: Liaw, Andy wrote: You could try googling for "delta method". I believe MASS even has code for that... I believe you are thinking of an example in S Programming, which does automatic differentiation and the delta method. -thomas

Re: [R] variance of combinations of means - off topic

2005-01-06 Thread Kent Holsinger
Bill Shipley wrote: Hello, and please excuse this off-topic question, but I have not been able to find an answer elsewhere. Consider a value Z that is calculated using the product (or ratio) of two means X_mean and Y_mean: Z=X_mean*Y_mean. More generally, Z=f(X_mean, Y_mean). The standard error

Re: [R] variance of combinations of means - off topic

2005-01-06 Thread Spencer Graves
Of course, the delta method is terrible when the first derivative is small relative to the curvature. In that case, you either need to consider bootstrap, Monte Carlo, permutation testing, as suggested by Venables and Ripley in MASS and S Programming, or possibly using a higher order Tayl