[R] Annotate forest plot 'forest.rma()' for meta-analysis with metafor package

2012-07-24 Thread Jokel Meyer
Dear R-experts, The forest.rma() function from the metafor package creates nice forest plots for presenting the results of a meta-analysis. These plots can be annotated for e.g. giving names to the columns. E.g. as in the documentation of the package: data(dat.bcg) ### meta-analysis of the log r

[R] Power calculation using pwr.t.test()

2012-06-24 Thread Jokel Meyer
Dear R experts, I have conducted a power calculation in order to estimate the number of subjects needed to detect an effect size of d=0.28 (cohen's d) for a difference between two independent groups (alpha level should be 0.05 and the effect should be detected with 80% probability). The results fr

[R] correct implementation of a mixed-model ANOVA in R

2012-04-15 Thread Jokel Meyer
Dear R-experts! I having trouble with the correct implementation of a mixed-model ANOVA in R. I my dataset subjects were tested in a cognitive performance test (numerical outcome variable 'score'). This cognitive performance test is devided into five blocks (categorical factor 'block'). All subj

[R] Using dcast with multiple functions to aggregate

2012-04-12 Thread Jokel Meyer
Dear R communitiy, I am trying to use multiple functions for aggregation within a function call for dcast. However this seems to result in an error. Also I have not managed to make dcast() work with fun.aggregate=sd. Please find attached some example code using the ChickWeight data. Many thanks f

[R] Embed R code in online database

2012-02-11 Thread Jokel Meyer
Dear R-List! I would like to embed R code in an online database such as i.e. a google spreadsheet in way that users can add data to the database and that R's calculations are updated automatically and i.e. given out in the spreadsheet. Maybe even graphs could be updated online? Is there a way to i

[R] Workflow for binary classification problem using svm via e1071 package

2011-09-27 Thread Jokel Meyer
Dear R-list! I am using the e1071 package in R to solve a binary classification problem in a dataset of round 180 predictor variables (blood metabolites) of two groups of subjects (patients and healthy controls). I am confused regarding the correct way to assess the classification accuracy of the t

[R] Assessing prediction performance of SVM using e1071 package

2011-09-24 Thread Jokel Meyer
Dear R-Users! I am using the svm function (e1071 package) to classify two groups using a set of 180 indicator variables. Now I am confused about the cross-validation procedure. (A) On one hand I use the setting cross=10 in the svm function to run 10 cross-validation iterations and to get an estim

[R] Main-effect of categorical variables in meta-analysis (metafor)

2011-08-05 Thread Jokel Meyer
Dear R-experts! In a meta-analysis (metafor) I would like to assess the effect of two categorical covariates (A & B) whereas they both have 4 levels. Is my understanding correct that this would require to dummy-code (0,1) each level of each covariate (A & B)? However I am interested in the main-ef

[R] Using NCBI E-Utilities in R to extract data from PubMed

2011-08-05 Thread Jokel Meyer
Dear R-experts! I found a great post on the "getting genetics done" blog which describes how to make use of NCBI E-utilities in Python to extract data from PubMed: http://gettinggeneticsdone.blogspot.com/2011/05/using-ncbi-e-utilities.html I was wondering whether there would be a way to directly

[R] Converting F-value from ANOVA to cohen's d in meta-analysis (metafor-package)

2011-07-27 Thread Jokel Meyer
Dear R-experts! Running a meta-analysis (using the magnificent metafor-package), I use cohen's d as a main outcome measure in a random-effects model. For most of the samples cohen's d is derived form a comparison of two groups (A & B). However some studies report results from an ANOVA (one-factor

[R] Extract confidence intervals from rma object (metafor package)

2011-07-18 Thread Jokel Meyer
Dear R-experts! I am working on some meta-analysis using the metafor package. I would like to extract values of the confidence intervals of the effect sizes of the single studies from an rma object. Those values are printed out when plotting a forest plot using the forest function on the rma objec

[R] Estimate average standard deviation of mean of two dependent groups

2010-08-25 Thread Jokel Meyer
Dear R-experts! I am currently running a meta-analysis with the help of the great metafor package. However I have some difficulties setting up my raw data to enter it to the meta-analysis models. I have a group of subjects that have been measured in two continuous variables (A & B). I have the inf