* using log directory 'd:/Rcompile/CRANpkg/local/2.11/MAd.Rcheck' * using R version 2.11.1 Patched (2010-07-29 r52657) * using session charset: ISO8859-1 * checking for file 'MAd/DESCRIPTION' ... OK * checking extension type ... Package * this is package 'MAd' version '0.8' * checking package dependencies ... OK * checking if this is a source package ... OK * checking whether package 'MAd' can be installed ... OK * checking package directory ... OK * checking for portable file names ... OK * checking DESCRIPTION meta-information ... OK * checking top-level files ... OK * checking index information ... OK * checking package subdirectories ... OK * checking R files for non-ASCII characters ... OK * checking R files for syntax errors ... OK * checking whether the package can be loaded ... OK * checking whether the package can be loaded with stated dependencies ... OK * checking whether the package can be unloaded cleanly ... OK * checking for unstated dependencies in R code ... OK * checking S3 generic/method consistency ... OK * checking replacement functions ... OK * checking foreign function calls ... OK * checking R code for possible problems ... NOTE CatModGraph: no visible binding for global variable 'g' CatModGraph: no visible binding for global variable 'wi' CatModGraph: no visible binding for global variable 'wi.tau' ForestPlot: no visible binding for global variable 'g' ForestPlot: no visible binding for global variable 'l.ci95' ForestPlot: no visible binding for global variable 'u.ci95' FunnelPlot: no visible binding for global variable 'se' FunnelPlot: no visible binding for global variable 'g' FunnelPlot: no visible binding for global variable 'se.tau' MAregGraph: no visible binding for global variable 'g' MAregGraph: no visible binding for global variable 'wi' MAregGraph: no visible binding for global variable 'wi.tau' MultiModGraph: no visible binding for global variable 'g' MultiModGraph: no visible binding for global variable 'wi' MultiModGraph: no visible binding for global variable 'wi.tau' mareg.default: no visible global function definition for 'rma' plotcat: no visible binding for global variable 'wi' plotcat: no visible binding for global variable 'wi.tau' plotcon: no visible binding for global variable 'wi' plotcon: no visible binding for global variable 'wi.tau' stat_sum_single1: no visible binding for global variable 'wi' stat_sum_single2: no visible binding for global variable 'wi.tau' * checking Rd files ... OK * checking Rd metadata ... OK * checking Rd cross-references ... OK * checking for missing documentation entries ... OK * checking for code/documentation mismatches ... OK * checking Rd \usage sections ... OK * checking Rd contents ... OK * checking examples ... ERROR Running examples in 'MAd-Ex.R' failed. The error most likely occurred in: > ### * MAd-package > > flush(stderr()); flush(stdout()) > > ### Name: MAd-package > ### Title: Meta-Analysis with Mean Differences > ### Aliases: MAd-package MAd > ### Keywords: package > > ### ** Examples > > # Examples for each broad area: > > id <- c(1, 1:19) > n.1 <- c(10,20,13,22,28,12,12,36,19,12,36,75,33,121,37,14,40,16,14,20) > n.2 <- c(11,22,10,20,25,12,12,36,19,11,34,75,33,120,37,14,40,16,10,21) > g <- c(.68,.56,.23,.64,.49,-.04,1.49,1.33,.58,1.18,-.11,1.27,.26,.40,.49, + .51,.40,.34,.42,1.16) > var.g <- c(.08,.06,.03,.04,.09,.04,.009,.033,.0058,.018,.011,.027,.026,.0040, + .049,.0051,.040,.034,.0042,.016) > mod <- factor(c(rep(c(1,1,2,3),5))) > mods2 <- c(rep(1:5,4)) > df <- data.frame(id, n.1, n.2, g, var.g, mod, mods2) > > # Note: for all the examples in this manual, we have made up data and manually > # created variables and datasets. If conducting your own meta-analysis, > # a more convenient way for using the functions is to import your data from > # a .csv file (with relevant variables in the dataset). One way to do this: > # df <- read.csv(file.choose(), header = TRUE) > # > # Then, you can run the functions with this dataset and you do not need to > # manually create your dataset, as we have done above. > > > # 1. Computations to Mean Differences: > > # For example, suppose the primary study reported an log odds ratio for different > # proportions between 2 groups. Then, running: > > lor_to_d(.9070,.0676) d var.d [1,] 0.5000553 0.02054794 > > # reported log odds ratio (lor = .9070) and variance (.0676) will output the > # standardized mean difference (d) and its variance (var.d) for use in > # the meta-analysis. > > # 2. Within-Study Aggregation of Effect Sizes: > > agg(id = id, g = g, var = var.g, n.1 = n.1, n.2 = n.2, data=df) id g var.g n.1 n.2 1 1 0.6189601 0.09906278 15 16 2 2 0.2300000 0.03000000 13 10 3 3 0.6400000 0.04000000 22 20 4 4 0.4900000 0.09000000 28 25 5 5 -0.0400000 0.04000000 12 12 6 6 1.4900000 0.00900000 12 12 7 7 1.3300000 0.03300000 36 36 8 8 0.5800000 0.00580000 19 19 9 9 1.1800000 0.01800000 12 11 10 10 -0.1100000 0.01100000 36 34 11 11 1.2700000 0.02700000 75 75 12 12 0.2600000 0.02600000 33 33 13 13 0.4000000 0.00400000 121 120 14 14 0.4900000 0.04900000 37 37 15 15 0.5100000 0.00510000 14 14 16 16 0.4000000 0.04000000 40 40 17 17 0.3400000 0.03400000 16 16 18 18 0.4200000 0.00420000 14 10 19 19 1.1600000 0.01600000 20 21 > > # where df = data.frame with columns for id, g (unbiased standardized > # mean difference), var.g (variance of g), n.1 (sample size of group > # one), and n.2 (sample size of comparison group) with multiple rows per > # study. Outputs an aggregated data.frame with 1 effect size per study. > > # 3. Fixed and Random Effects Omnibus Analysis > > omni(g = g, var = var.g, data = df, type="weighted", method = "random") Model Results: k estimate var se ci.l ci.u z p 1 20 0.6187 0.01 0.0999 0.4228 0.8146 6.1904 0 Heterogeneity: Q df.Q Qp I2 1 246.7227 19 0 92.299% > > # where df = data.frame with columns for id, g (unbiased standardized > # mean difference), var.g (variance of g), n.1 (sample size of group > # one), and n.2 (sample size of comparison group). > > # 4. Moderator Analyses: > > # Random effects > mareg(g~ mod + mods2, var = var.g, method = "REML", data = df) Warning in library(package, lib.loc = lib.loc, character.only = TRUE, logical.return = TRUE, : there is no package called 'metafor' Error in mareg.default(g ~ mod + mods2, var = var.g, method = "REML", : could not find function "rma" Calls: mareg -> mareg.default Execution halted