[insert information on the definition of the outcomes modeled]. Heterogeneity across studies was first examined using quantitative and qualitative criteria and clinical judgment. Qualitative factors included the type of [criteria used to evaluate methodological homogeneity]. While quantitative indicators were Cochrane's Q (considering p-values lower than 0.05 to indicators of heterogeneity), H and I statistics (Higgins and Thompson, 2002). High Iˆ2 values indicate high heterogeneity, with a proposed categorization of 25% (low), 45% (moderate) and 75% (high) (Higgins et al., 2003). In our study, we adopted the interpretation of the [method of estimation] because our main goal is to [random-effect-summarize the estimates of XXXX, across a variety of studies, being applicable to different scenarios and populations as comprehended in the systematic revire OR fixed-effect-find the true-effect of of XXXX along different populations sized reported in the literature]. Also, as a form of sensibility for the
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #KMO | |
| kmo = function( data ){ | |
| library(MASS) | |
| X <- cor(as.matrix(data)) | |
| iX <- ginv(X) | |
| S2 <- diag(diag((iX^-1))) | |
| AIS <- S2%*%iX%*%S2 # anti-image covariance matrix | |
| IS <- X+AIS-2*S2 # image covariance matrix | |
| Dai <- sqrt(diag(diag(AIS))) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ##################################################################################### | |
| #R TEMPLATE FOR NETWORK METANALYSIS | |
| ##################################################################################### | |
| # | |
| # | |
| # | |
| # | |
| # | |
| ##################################################################################### | |
| #SETTING ENVIRONMENT |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ####################################################################################### | |
| #example_metanalysis.R is licensed under a Creative Commons Attribution - Non commercial 3.0 Unported License. see full license at the end of this file. | |
| ####################################################################################### | |
| #this script follows a combination of the guidelines proposed by Hadley Wickham http://goo.gl/c04kq as well as using the formatR package http://goo.gl/ri6ky | |
| #if this is the first time you are conducting an analysis using this protocol, please watch http://goo.gl/DajIN while following step by step | |
| #link to manuscript | |
| ##################################################################################### | |
| #SETTING ENVIRONMENT |
#Cursor movement
h - move left
j - move down
k - move up
l - move right
ctrl-b - page up
ctrl-f - page down
% - jump to matching brace
w - jump by start of words (punctuation considered words)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # script stolen and adapted from http://goo.gl/kUzaov | |
| if (!require('sem')) install.packages('sem') | |
| if (!require('lavaan')) install.packages('lavaan') | |
| if (!require('Rcmdr')) install.packages('Rcmdr') | |
| # creating a dataset for g + 3 factors, all orthogonal |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ###################################################################### | |
| #BASIC R STATISTICS TEMPLATE | |
| ###################################################################### | |
| # | |
| # | |
| # | |
| # | |
| # | |
| ###################################################################### | |
| #SETTING ENVIRONMENT |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # | |
| # Functions to make ggplot KM survivor curves made with survfit() in library(survival) | |
| # | |
| # code written by Ramon Saccilotto | |
| # and included in his ggplot2 tutorial | |
| # 2010-12-08 | |
| # define custom function to create a survival data.frame | |
| createSurvivalFrame <- function(f.survfit){ | |
| # initialise frame variable |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| doInstall <- TRUE | |
| toInstall <- c("ggplot2", "poLCA", "reshape2") | |
| if(doInstall){install.packages(toInstall, repos = "http://cran.us.r-project.org")} | |
| lapply(toInstall, library, character.only = TRUE) | |
| ANES <- read.csv("http://www.oberlin.edu/faculty/cdesante/assets/downloads/ANES.csv") | |
| ANES <- ANES[ANES$year == 2008, -c(1, 11, 17)] # Limit to just 2008 respondents, | |
| head(ANES) # remove some non-helpful variables | |
| # Adjust so that 1 is the minimum value for each variable: | |
| ANES <- data.frame(apply(ANES, 2, function(cc){ cc - min(cc, na.rm = T) + 1 })) |