Skip to content

Instantly share code, notes, and snippets.


Praveen Kumar M praveenkumarpgiindia

Block or report user

Report or block praveenkumarpgiindia

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
praveenkumarpgiindia / CI_vs_CP.R
Created Oct 28, 2018 — forked from Lakens/CI_vs_CP.R
confidence intervals vs capture percentages
View CI_vs_CP.R
n=20 #set sample size
nSims<-100000 #set number of simulations
x<-rnorm(n = n, mean = 100, sd = 15) #create sample from normal distribution
CIU<-mean(x)+qt(0.975, df = n-1)*sd(x)*sqrt(1/n)
View PlotScopusData.R
#Save downloaded Scopus data in your working directory
plot1<-ggplot(scopusdata, aes( +
geom_histogram(colour="#535353", fill="#84D5F0", binwidth=2) +
xlab("Number of Citations") + ylab("Number of Articles") +
ggtitle("Citation Data for Psychological Science 2011-2015") +
coord_cartesian(xlim = c(-5, 250))
praveenkumarpgiindia / Meta-Analysis in R
Created Oct 28, 2018 — forked from Lakens/Meta-Analysis in R
Perform a meta-analysis in R
View Meta-Analysis in R
#Script based on Carter & McCullough (2014) doi: 10.3389/fpsyg.2014.00823
#Load Libraries
#Insert effect sizes and sample sizes
praveenkumarpgiindia / 4study_meta_50%_true_effects.R
Created Oct 28, 2018 — forked from Lakens/4study_meta_50%_true_effects.R
Internal meta-analysis on 4 studies, 50% of which are true effects
View 4study_meta_50%_true_effects.R
nSims <- 1000000 #number of simulated experiments
numberstudies<-4 # nSim/numberofstudies should be whole number
p <-numeric(nSims) #set up empty container for all simulated p-values
metapran <-numeric(nSims/numberstudies) #set up empty container for all simulated p-values for random effects MA
metapfix <-numeric(nSims/numberstudies) #set up empty container for all simulated p-values for fixed effects MA
heterog.p<-numeric(nSims/numberstudies) #set up empty container for test for heterogeneity
d <-numeric(nSims) #set up empty container for all simulated d's
View p-value_misconceptions_figures.R
options(scipen=999) #disable scientific notation for numbers
#Figure 1 & 2 (set to N <- 5000 for Figure 2)
# Set x-axis upper and lower scalepoint (to do: automate)
#Set sample size per group and effect size d (assumes equal sample sizes per group)
N<-50 #sample size per group for indepndent t-test
praveenkumarpgiindia / emailing_students_from_R.R
Created Oct 28, 2018 — forked from Lakens/emailing_students_from_R.R
Emailing students from R using mailR package
View emailing_students_from_R.R
#Load packages
#Read student data
info <- read_excel("student_names_email.xls",
sheet = 1,
col_names = TRUE)
#Loop from 1 to the number of email addresses in the spreadsheet
View metaanalysis.r
## meta analysis, sample size based
metaZn = function(zdisc,zrepl,ndisc,nrepl)
## calculate meta analysis Zscore
## zdisc and zrepl are zscores in the discovery and replication sets respectively
## ndisc and nrepl are sample sizes in the discovery and replication sets
wdisc = sqrt(ndisc)
wrepl = sqrt(nrepl)
( zdisc * wdisc + zrepl * wrepl )/sqrt( wdisc^2 + wrepl^2 )
View logistic_regression.R
# Load the raw training data and replace missing values with NA <- read.csv('train.csv',header=T,na.strings=c(""))
# Output the number of missing values for each column
sapply(,function(x) sum(
# Quick check for how many different values for each feature
sapply(, function(x) length(unique(x)))
# A visual way to check for missing data
praveenkumarpgiindia /
Created Aug 17, 2018 — forked from mrkline/
An intro to C# for a Python developer. Made for one of my coworkers.

C# For Python Programmers

Syntax and core concepts

Basic Syntax

  • Single-line comments are started with //. Multi-line comments are started with /* and ended with */.

  • C# uses braces ({ and }) instead of indentation to organize code into blocks. If a block is a single line, the braces can be omitted. For example,

You can’t perform that action at this time.