This file contains 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
# *------------------------------------------------------------------ | |
# | PROGRAM NAME: R_COPULA_BASIC | |
# | DATE: 1/25/11 | |
# | CREATED BY: Matt Bogard | |
# | PROJECT FILE: http://econometricsense.blogspot.com/2011/03/copula-functions-r-and-financial-crisis.html | |
# *---------------------------------------------------------------- | |
# | PURPOSE: copula graphics | |
# | | |
# *------------------------------------------------------------------ | |
# | COMMENTS: |
This file contains 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
# *------------------------------------------------------------------ | |
# | PROGRAM NAME: INDIFFERENCE_CURVES_R | |
# | DATE: 3/11/11 | |
# | CREATED BY: MATT BOGARD | |
# | PROJECT FILE: http://econometricsense.blogspot.com/2011/03/plotting-indifference-curves-with-r.html | |
# *---------------------------------------------------------------- | |
# | PURPOSE: MORE TO PLOT LEVEL SETS USING THE CONTOUR FUNCTION THAN | |
# | TO ACTUALLY PLOT INDIFFERENCE CURVES | |
# *------------------------------------------------------------------ | |
# | COMMENTS: |
This file contains 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 Code to support: http://econometricsense.blogspot.com/2011/05/intuitive-approach-to-roc-curves-with.html | |
# *------------------------------------------------------------------ | |
# | | |
# | import scored logit data from SAS - code generated by SAS MACRO %EXPORT_TO_R | |
# | | |
# | | |
# *----------------------------------------------------------------- | |
This file contains 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
# ------------------------------------------------------------------ | |
# |PROGRAM NAME: EX_QTL_R | |
# |DATE: 8-13-11 | |
# |CREATED BY: MATT BOGARD | |
# |PROJECT FILE: http://econometricsense.blogspot.com/2011/08/qtl-analysis-in-r.html | |
# |---------------------------------------------------------------- | |
# | PURPOSE: DEMONSTRATE STATISTICAL METHODS FOR QTL ANALYSIS IN R | |
# | | |
# |------------------------------------------------------------------ | |
# | REFERENCE: R code for "A brief tour of R/qtl" |
This file contains 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
# ------------------------------------------------------------------ | |
# | PROGRAM NAME: EX_BAYESIAN_ECONOMETRCS | |
# | DATE: 9-15-11 | |
# | CREATED BY: MATT BOGARD | |
# | PROJECT FILE: http://econometricsense.blogspot.com/2011/09/elements-of-bayesian-econometrics.html | |
# |---------------------------------------------------------------- | |
# | ADAPTED FROM: Andrew D. Martin. "Bayesian Inference and Computation in Political Science." Slides from a talk given to the Department of Politics, Nuffield College, Oxford University, March 9, # | 2004. SLIDES:http://adm.wustl.edu/media/talks/bayesslides.pdf R-CODE : http://adm.wustl.edu/media/talks/examples.zip | |
# | | |
# | | |
# | |
This file contains 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
# ------------------------------------------------------------------ | |
# | PROGRAM NAME: ex_bayesian_tobit | |
# | DATE: 9/17/11 | |
# | CREATED BY: Matt Bogard | |
# | PROJECT FILE: http://econometricsense.blogspot.com/2011/09/bayesian-models-with-censored-data.html | |
# |---------------------------------------------------------------- | |
# | PURPOSE: comparison of models for censored dependent variables | |
# | 1 - least squares | |
# | 2 - tobit model | |
# | 3 - bayesian model |
This file contains 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
# ---------------------------------------------------------------------------------- | |
# |PROGRAM NAME: gradient_descent_R | |
# |DATE: 11/27/11 | |
# |CREATED BY: MATT BOGARD | |
# |PROJECT FILE: http://econometricsense.blogspot.com/2011/11/gradient-descent-in-r.html | |
# |---------------------------------------------------------------------------------- | |
# | PURPOSE: illustration of gradient descent algorithm | |
# | REFERENCE: adapted from : http://www.cs.colostate.edu/~anderson/cs545/Lectures/week6day2/week6day2.pdf | |
# | | |
# --------------------------------------------------------------------------------- |
This file contains 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
# to support: http://econometricsense.blogspot.com/2011/11/basic-econometrics-in-r-and-sas.html | |
#------------------------------------------------------------ | |
# regression with canned lm routine | |
#------------------------------------------------------------ | |
# read in data manually | |
x <- c(1,2,3,4,5) # read in x -values | |
y <- c(3,7,5,11,14) # read in y-values |
This file contains 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
# ---------------------------------------------------------------------------------- | |
# |PROGRAM NAME: gradient_descent_OLS_R | |
# |DATE: 11/27/11 | |
# |CREATED BY: MATT BOGARD | |
# |PROJECT FILE: | |
# |---------------------------------------------------------------------------------- | |
# | PURPOSE: illustration of gradient descent algorithm applied to OLS | |
# | To support: http://econometricsense.blogspot.com/2011/11/regression-via-gradient-descent-in-r.html | |
# | REFERENCE: adapted from : http://www.cs.colostate.edu/~anderson/cs545/Lectures/week6day2/week6day2.pdf | |
# | and http://www.statalgo.com/2011/10/17/stanford-ml-1-2-gradient-descent/ |
This file contains 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
# *------------------------------------------------------------------ | |
# | PROGRAM NAME: R_tree_basic | |
# | DATE:4/26/11 | |
# | CREATED BY: Matt Bogard | |
# | PROJECT FILE:P:\R Code References\Data Mining_R | |
# *---------------------------------------------------------------- | |
# | PURPOSE: demo of basic decision tree mechanics | |
# | To support post: http://econometricsense.blogspot.com/2012/01/decision-tree-basics-in-sas-and-r.html | |
# *------------------------------------------------------------------ | |