Skip to content

Instantly share code, notes, and snippets.

⚽️
Playing soccer

José Alvarez C. josealvarez97

⚽️
Playing soccer
Block or report user

Report or block josealvarez97

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
View CS112_11_1_1.R
# If you are copy/pasting this to an R Notebook, select "Raw" from the GitHub page before you copy.
# Replication file of Section 5 in
# Iacus, King, Porro (2011), Multivariate Matching Methods
# That Are Monotonic Imbalance Bounding, JASA, V 106, N. 493,
# p. 345-361
foo <- read.csv(url("https://course-resources.minerva.kgi.edu/uploaded_files/mke/00089202-1711/daughters.csv"))
# Table 1 in Ebonya
@josealvarez97
josealvarez97 / LogitLalondeDataSet.R
Created Oct 3, 2018
JoseAlvarezCabrera-MakeUpWork-Session3.2-CS112
View LogitLalondeDataSet.R
# Logistic Regression and lalonde data set
library(Matching)
data(lalonde)
head(lalonde)
summary(lalonde)
View(lalonde)
??lalonde
# Note: For simplicity, all operations will be performed over the training model.
View Preclass3.3.R
# Produce model from training set
LinearRegression.1 <- lm(clickperview ~ timeofday + Post_type + promotion + target_audience, data=Lironne_DataSet_Training)
summary(LinearRegression.1)
predict(LinearRegression.1,Lironne_DataSet_Training) == Lironne_DataSet_Training
# Calculate RMSE for training set
RMSE.trainingset <- sqrt(mean( (Lironne_DataSet_Training$clickperview - predict(LinearRegression.1, Lironne_DataSet_Training))^2 ))
RMSE.trainingset
@josealvarez97
josealvarez97 / CS112Assignment-JoseAlvarez.R
Last active Sep 20, 2018
Code used for Part 2 of assignment: Decision Memo 1: The Drivetrain Approach to Decision Making - CS112. By Jose Alvarez Cabrera
View CS112Assignment-JoseAlvarez.R
# READ DATA
DataSet <- read.csv("datasetforCS112-TA.csv", stringsAsFactors = FALSE)
# FIX DATA TYPES IN DATA FRAME
# Factors
DataSet$status <- as.factor(DataSet$status)
DataSet$project.type <- as.factor(DataSet$project.type)
# Dates
DataSet$approval.date <- as.Date(DataSet$approval.date, format = "%d-%B-%y")
DataSet$implementation.start.date <- as.Date(DataSet$implementation.start.date, format="%d-%B-%y")
You can’t perform that action at this time.