Skip to content

Instantly share code, notes, and snippets.

View joaovissoci's full-sized avatar

Joao Ricardo N Vissoci joaovissoci

View GitHub Profile
@joaovissoci
joaovissoci / metanalysis_template.md
Last active August 29, 2015 14:04
metanalysis_template

Methods

[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

@joaovissoci
joaovissoci / kmo_function.R
Last active October 5, 2023 08:11
Kmo calculation
#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)))
@joaovissoci
joaovissoci / r_nma_template.R
Created June 25, 2014 04:28
#R TEMPLATE FOR NETWORK METANALYSIS
#####################################################################################
#R TEMPLATE FOR NETWORK METANALYSIS
#####################################################################################
#
#
#
#
#
#####################################################################################
#SETTING ENVIRONMENT
@joaovissoci
joaovissoci / script_exemplo_metanalise.R
Last active May 14, 2018 17:40
example of R script for metanalysis in R
#######################################################################################
#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
@joelbyler
joelbyler / vim.md
Last active May 26, 2017 03:12
Vim cheat sheet

#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)

# 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
@joaovissoci
joaovissoci / r_basics_template.R
Last active July 6, 2016 22:21
basic R statistical functions
######################################################################
#BASIC R STATISTICS TEMPLATE
######################################################################
#
#
#
#
#
######################################################################
#SETTING ENVIRONMENT
#
# 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
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 }))

Titulo

Abstract

Introduction

Relevancia

*Prevelência de lesoes e deficiencias *Custo em reabilitação