Re: [R] Cochran's Q statistic

2009-06-04 Thread Weiss, Bernd
jlfmssm schrieb: Does anyone know which package include the computation of Cochran?s Q statistic in R? jlfmssm [[alternative HTML version deleted]] I might be wrong but the packages rmeta and meta report a Q-statistic. For an example, see library(meta) meta1 metagen(meta1$TE, meta

[R] [ggplot2] Densityplot, grouping and NAs

2009-03-24 Thread Weiss, Bernd
Dear all, I do not fully understand how ggplot2 handles NAs. See the following example: library(ggplot2) x <- rnorm(150) g <- as.factor(c(rep(c(0,1,NA),50))) mydf <- data.frame(x,g) m <- ggplot(aes(x = x, group = g, color = g), data = mydf) m + geom_density() How do I get rid of the NAs (i.

Re: [R] perform subgroup meta-analysis and create forest plot displaying subgroups

2009-03-09 Thread Weiss, Bernd
Steven Lubitz schrieb: Hello, I'm using the rmeta package to perform a meta analysis using summary statistics rather than raw data, and would like to analyze the effects in three different subgroups of my data. Furthermore, I'd like to plot this on one forest plot, with corresponding summary weig

[R] Question about collapse/aggregate and avoidance of loops

2009-01-28 Thread Weiss, Bernd
Dear all, given the following data ## original data id <- c(1,1,1,2,2,3) author <- c("A","B","C","D","E","F") tmp <- data.frame(id,author) tmp > tmp id author 1 1 A 2 1 B 3 1 C 4 2 D 5 2 E 6 3 F What is the best (most efficient/vectorized/avoiding loops)

Re: [R] Changing values (factors) does not change levels of that value?!

2008-11-16 Thread Weiss, Bernd
Philipp Pagel schrieb: * when then looking at str(weblog), the "-" will stay in the levels, mentioned for the variable weblog$V8 -> BAD! Is this snormal behaviour? Yes, it is. The idea is that a factor has a given set of levels independent of how often you find them in your data - inclu

Re: [R] glmer -- extracting standard errors and other statistics

2008-09-21 Thread Weiss, Bernd
John Poulsen schrieb: Hello, I am using glmer() from lmer(lme4) to run generalized linear mixed models. However, I am having a problem extracting the standard errors for the fixed effects. I have used: summary(model)$coef fixed.effects(model) coef(model) to get out the parameter estimates