Re: [R] Z-test

2011-07-16 Thread Joshua Wiley
On Sat, Jul 16, 2011 at 12:05 AM, Rolf Turner wrote: > (1) Why on earth should the n - 1 divisor be a problem?  This divisor > yields an unbiased estimator of sigma^2.  Generally speaking, > unbiasedness is a Good Thing. Yes, it is an unbiased estimator of sigma^2 for a sample. My response was p

Re: [R] Z-test

2011-07-16 Thread Rolf Turner
On 16/07/11 17:49, Joshua Wiley wrote: Hi, The Z is basically: (mean(x) - mean(y))/sqrt(var(x)/length(x) + var(y)/length(y)) and pnorm will give you a p-value, if you desire it. If the n - 1 divisior used in var() is a problem for you, it is trivial to work around: (1) Why on earth should

Re: [R] Z-test

2011-07-15 Thread Joshua Wiley
Hi, The Z is basically: (mean(x) - mean(y))/sqrt(var(x)/length(x) + var(y)/length(y)) and pnorm will give you a p-value, if you desire it. If the n - 1 divisior used in var() is a problem for you, it is trivial to work around: X <- cbind(x, y) XX <- crossprod(X - tcrossprod(matrix(1, nrow(X)))

Re: [R] Z-test

2011-07-15 Thread Joshua Wiley
Hi Bogdan, Look at ?pnorm Josh On Fri, Jul 15, 2011 at 9:10 PM, Bogdan Tanasa wrote: > Hi, > > please could you recommend a R package that computes a 2 sample z-test ? > > thanks, > > Bogdan > >        [[alternative HTML version deleted]] > > __ > R-h

[R] Z-test

2011-07-15 Thread Bogdan Tanasa
Hi, please could you recommend a R package that computes a 2 sample z-test ? thanks, Bogdan [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guid

[R] z-test with NAs

2009-11-13 Thread ms.com
Dear all I am learning R I am doing Z-test with package 'BSDA' here is my syntax and result: > sdgr.ztest<-z.test(growth[type=='SD'& from_treeline=='above'], + > growth[type=='SD'& from_treeline=='below'],alternative = "two.sided", + mu > = 0, sigma.x =(sd(growth[type=='SD'& from_treeline==

Re: [R] Z test and proportions

2008-06-17 Thread Peter Dalgaard
Michael Pearmain wrote: > Yes my mistake, > > I looked at the pwr.2p2n.test but i cannot place both n's and both p > values to determine the sig value > e,g *pwr.2p2n.test(h = , n1 = , n2 = , sig.level = , power = ) > > or am i missing someting obvious? > > * Not quite obvious, but h is the effect

Re: [R] Z test and proportions

2008-06-17 Thread Michael Pearmain
Yes my mistake, I looked at the pwr.2p2n.test but i cannot place both n's and both p values to determine the sig value e,g *pwr.2p2n.test(h = , n1 = , n2 = , sig.level = , power = ) or am i missing someting obvious? i did the sam ein SPSS using a macro and the following code: COMPUTE n1 = Contr

Re: [R] Z test and proportions

2008-06-17 Thread Peter Dalgaard
Michael Pearmain wrote: > Hi All, > > I have a table based on ordial data and i want to compare proportions and > i've seen in the pwr package i can use > power.prop.test > > however i want to find out what the sig. value is based on n1,n2,p1,p2 and > this package doesn't contain this.. > Does anyo

[R] Z test and proportions

2008-06-17 Thread Michael Pearmain
Hi All, I have a table based on ordial data and i want to compare proportions and i've seen in the pwr package i can use power.prop.test however i want to find out what the sig. value is based on n1,n2,p1,p2 and this package doesn't contain this.. Does anyone know of a package that does or is it