[R] p-value of the pooled Z score

2012-03-13 Thread cheba meier
Hello, I have to compute the pooled z-value and I would like to know which way is more appropriate b <- c( -0.205,1.040,0.087) s <- c(0.449,0.167,0.241) n <- c(310, 342, 348) z <- b/s Z <- sum(z)/sqrt(length(n)) P <- 2*(1-pnorm(abs(Z))) P w <- sqrt(n) Zw <- sum(w * z)/sqrt(sum(w^2)) Pw <- 1 -

Re: [R] metaplot

2011-04-08 Thread cheba meier
I installed R 2.12 and it works now, thank you Wolfgang. Servus Cheba > library(metafor) Error: This is R 2.11.0, package 'metafor' needs >= 2.12.0 2011/4/8 cheba meier > I have just installed the package as > > > install.packages("metafor") > --- Pl

Re: [R] metaplot

2011-04-08 Thread cheba meier
t;) >> >> or: >> >> forest(log(rr), ci.lb=lci, ci.ub=uci, xlab="Relative Risk", atransf=exp) >> >> help(forest.default) will tell you more about using the forest() function. >> >> Best, >> >> -- >> Wolfgang Viechtbauer >>

Re: [R] metaplot

2011-04-08 Thread cheba meier
rest() function. > > Best, > > -- > Wolfgang Viechtbauer > Department of Psychiatry and Neuropsychology > School for Mental Health and Neuroscience > Maastricht University, P.O. Box 616 > 6200 MD Maastricht, The Netherlands > Tel: +31 (43) 368-5248 > Fax: +31 (43) 368-8689

Re: [R] metaplot

2011-04-07 Thread cheba meier
g ggplot2 package: > > limits <- aes(ymax = OR + (OR - 95%LCI), ymin = OR - (OR - 95%LCI)) > ggplot(dataframe, aes(x = Study.Name, y = OR)) + geom_point() + > geom_errobar(limits) > > Best, > Scott > > On Wednesday, April 6, 2011 at 11:53 AM, cheba meier wrote: > >

[R] metaplot

2011-04-06 Thread cheba meier
Dear all, I have a four variable: Stuy.Name, OR, 95%LCI and 95%UCI and I would like to create a meta analysis plot. I can't use meta.MH function in metaplot because I do not have n.trt, n.ctrl, col.trt, col.ctrl are not available! Is there an alternative way to do it? Many thanks in advance, Cheb

[R] two group cox model

2010-10-30 Thread cheba meier
Dear all, I am doing library(survival) fit <- coxph(Surv(futime,fustat) ~ rx, ovarian) plot(survfit(fit,newdata=ovarian),col=c(1,2)) legend("bottomleft", legend=c("rx = 0", "rx = 1"), lty=c(1,2),col=c(1,2)) Is this correct to compare these two groups? Is the 0.31 the p-value that the me

[R] by group testing

2010-08-04 Thread cheba meier
Hello, I have a data set which is similar to the following data mice <- rep(letters[1:4],10) outcome <- sample(c(0,1),length(mice),replace=T) group <- c(rep("A",length(mice)/2),rep("B",length(mice)/2)) my.data <- data.frame(mice,outcome,group) my.sort.data <- my.data[order(my.data[,1]),] I woul

Re: [R] plotmeans

2010-06-29 Thread cheba meier
e y limits of both plots...) > > > HTH > Jannis > > cheba meier schrieb: > >> Hello, >> >> I am using >> library(gplots) >> to do something like >> data(state) >> x1 <- state.area/1 >> x2 <- x1+round((rnorm(length(sta

[R] plotmeans

2010-06-28 Thread cheba meier
Hello, I am using library(gplots) to do something like data(state) x1 <- state.area/1 x2 <- x1+round((rnorm(length(state.area),3,3))) plotmeans(x1 ~ state.region) Is it possible to plot x2 to x1 in the same graph, something like: linesmeans(x2 ~ state.region) Best wishes, Cheba

Re: [R] median of two groups

2010-05-12 Thread cheba meier
out >= out[1] ) > > > Hope this helps, > > -- > Gregory (Greg) L. Snow Ph.D. > Statistical Data Center > Intermountain Healthcare > greg.s...@imail.org > 801.408.8111 > > > > -Original Message----- > > From: r-help-boun...@r-project.org [mai

Re: [R] median of two groups

2010-05-10 Thread cheba meier
s > > -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] > On > Behalf Of cheba meier > Sent: Friday, May 07, 2010 12:46 PM > To: Joris Meys > Cc: R-help@r-project.org; Thomas Lumley > Subject: Re: [R] median of two groups

Re: [R] median of two groups

2010-05-07 Thread cheba meier
ifference of the medians, or the median of the absolute > differences. Probably the latter one, so you would be right. If it's the > former one, then it is testing whether the difference of the medians is > zero. > > Cheers > Joris > > > On Fri, May 7, 2010 at 6:52 PM, Tho

Re: [R] median of two groups

2010-05-07 Thread cheba meier
the binary variable has > the same mean in the two samples. > > median.test<-function(x,y){ > z<-c(x,y) > g <- rep(1:2, c(length(x),length(y))) > m<-median(z) > fisher.test(z } > > Like most exact tests, it is quite conservative at small sample sizes. &

Re: [R] median of two groups

2010-04-07 Thread cheba meier
gt; median.test<-function(x,y){ > z<-c(x,y) > g <- rep(1:2, c(length(x),length(y))) > m<-median(z) > fisher.test(z } > > Like most exact tests, it is quite conservative at small sample sizes. > > -thomas > > > On Tue, 6 Apr 2010, cheba meier wr

[R] median of two groups

2010-04-06 Thread cheba meier
Dear all, What is the right test to test whether the median of two groups are statistically significant? Is it the wilcox.test, mood.test or the ks.test? In the text book I have got there is explanation for the Wilcoxon (Mann Whitney) test which tests ob the two variable are from the same populati

[R] reading excel into R

2010-04-01 Thread cheba meier
Dear all, I am new R user and I am sure that this question has been asked quite often and I have also googled it and read about it! I understood that in order to read excel sheet into R you need to open it and saved it as csv or text, is this true? or you can use read.delim2 and read.csv2 to do th

Re: [R] save data to an R object

2010-03-17 Thread cheba meier
gt; save(df1, df2, file="test.Rda") > #load them in another session > load("test.Rda") > > df1 > letter number > 1 a 1 > 2 b 2 > 3 c 3 > > df2 > letter number > 1 d 4 > 2 e 5 > 3 f

[R] save data to an R object

2010-03-17 Thread cheba meier
Dear R people, Is it possible to save three data sets in an R object and to call each data from this object independently! Regards, Cheba [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/li