Skip to content

Instantly share code, notes, and snippets.

@asudipta
asudipta / code.R
Last active August 29, 2015 14:12 — forked from ramnathv/code.R
hair_eye_male <- subset(as.data.frame(HairEyeColor), Sex == "Male")
n2 <- nPlot(Freq ~ Hair, group = 'Eye', data = hair_eye_male, type = 'multiBarChart')
n2
@asudipta
asudipta / GARCH.R
Last active August 29, 2015 14:12 — forked from Shreyes2010/GARCH.R
# Specifying functions:
CalcResiduals <- function(th, data) {
# Calculates the e_t and h_t for the GARCH(1, 1) model with given parameters.
#
# Argumentss:
# th: Parameters
# th[1] -> mean
# th[2] -> alpha.0
# th[3] -> alpha.1