Re: [R] gamma distribution

From: <pantd_at_unlv.nevada.edu>
Date: Thu 28 Jul 2005 - 17:44:42 EST

thanks for your response. btw i am calculating the power of the wilcoxon test. i divide the total no. of rejections by the no. of simulations. so for 1000 simulations, at 0.05 level of significance if the no. of rejections are 50 then the power will be 50/1000 = 0.05. thats y im importing in excel the p values.

is my approach correct??

thanks n regards
-dev

Quoting Uwe Ligges <ligges@statistik.uni-dortmund.de>:

> Answering both messges here:
>
>
> 1. pantd@unlv.nevada.edu wrote:
> > Hi I appreciate your response. This is what I observed..taking
> > the log transform of the raw gamma does change the p value of
> > the test. That is what I am importing into excel (the p - values)
>
> Well, so you made a mistake! And I still do not know why anybody realy
> want to import data to Excel, if the data is already in R.
>
> For me, the results are identical (and there is no reason why not).
>
>
> > and then calculating the power of the test (both raw and
> > transformed).
> >
> > can you tell me what exactly your code is doing?
>
> See below.
>
>
> 2. pantd@unlv.nevada.edu wrote:
> > Hi
> > I ran your code. I think it should give me the number of p values below
> 0.05
> > significance level (thats what i could understand from your code), but
> after
> > running your code there is neither any error that shows up nor any value
> that
> > the console displays.
>
> You are right in the point what the code I sent does:
>
> erg <- replicate(1000, {
> x<-rgamma(10, 2.5, scale = 10)
> y<-rgamma(10, 2.5, scale = 10)
> wilcox.test(x, y, var.equal = FALSE)$p.value
> })
> sum(erg < 0.05) # 45
>
>
> and it works for me. It results in a random number close to 50, hopefully.
>
> Since both points above seem to be very strange on your machine: Which
> version of R are you using? We assume the most recent one which is R-2.1.1.
>
> Uwe Ligges
>
>



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 Thu Jul 28 17:48:42 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:34:06 EST