RCR.R User Guide. Table of Contents. Version 0.9

Size: px
Start display at page:

Download "RCR.R User Guide. Table of Contents. Version 0.9"

Transcription

1 RCR.R User Guide Version 0.9 Table of Contents 1 Introduction Obtaining the program Installation Running the example file Updates and technical support Estimating the RCR model The basic estimation command Additional estimation options... 4 Choosing a custom range for λ... 4 Cluster-robust standard errors... 4 Confidence interval options Creating plots... 5 Changing the range of values to plot... 5 Plotting *λ L,λ H + and *θ L,θ H ]... 5 Including a legend... 6 Choosing plot elements... 6 Confidence intervals... 6 Advanced options Notes for advanced users Class descriptions... 6 rcr... 7 parameter... 7 Theta A note on standard error estimates Version History... 9 References... 10

2 1 Introduction This file provides documentation for the downloadable computer program (written in R) implementing the estimation method described in my paper Bounding a linear causal effect using relative correlation restrictions (Krauth 2008). The program is designed to estimate the linear model: (1) where y is a scalar outcome of interest, z is a scalar variable whose effect on y we are interested in estimating, and X is a vector of control variables such that (without loss of generality). The parameter of interest here is θ, which is being interpreted as the effect of z on y. That effect is identified and can be estimated by the OLS regression of y on (z,x) if z is exogenous given the control variables, i.e., if. However, there are many cases where it is unreasonable to believe that z is absolutely exogenous, but reasonably to believe that it is mostly exogenous (i.e., that is small). One convenient way of modeling mostly exogenous is by replacing the absolute restriction that with the weaker relative correlation restriction: (2) where Λ is some interval specified by the econometrician. This program estimates the econometric model defined by equations (1) and (2). 1.1 Obtaining the program The program distribution is available online at and contains four files: rcr_r_userguide.pdf This document. rcr.r A text file containing the R functions needed to implement RCR estimation. example.r An example R program that uses the functions in rcr.r to estimate a particular model on actual data. This particular program estimates class size effects in kindergarten for Project STAR students, i.e., the first column in Table 3 of Krauth (2008). example_data.dta The data set (in Stata format) used by example.r

3 The code uses R, an open-source statistical package based on the S language. The code will also run on commercial packages based on S (e.g., on S-Plus). R can be obtained free of charge from Installation To install the code, just unzip the distribution files into a directory of your choice. The text file rcr.r contains the source code for all of the necessary functions. functions available during a particular R session, just execute the command: To make those source( pathname/rcr.r ) where pathname is the full path of the directory into which you have placed the files. For example, if you have placed the files in C:\work, then execute the command source( c:/work/rcr.r ). 1.3 Running the example file The distribution also includes an example file named example.r. It provides several examples using the CMU function on the Project STAR data described in the paper. To run it, open R and execute the command: source( pathname/example.r,chdir=t) where pathname is the full path of the directory into which you have placed the files. For example, if you have placed the files in C:\work, then execute the command source( c:/work/example.r,chdir=t). 1.4 Updates and technical support I am happy to provide technical support by at bkrauth@sfu.ca. Updates to the code and documentation will be available at My intention is to make this program easy to use, so I greatly appreciate any comments or suggestions. 2 Estimating the RCR model 2.1 The basic estimation command The RCR model can be estimated by simply executing the function: where rcr(x,y,z) x is an n-by-k matrix of control variables. The first column of x should be a column of ones. y is an n-by-1 matrix (or n-vector) of outcome variables. z is an n-by-1 matrix (or n-vector) of treatment variables.

4 This function returns an object of class rcr. RCR objects have methods for several generic functions, including print, plot, and summary. Output from rcr will look something like this: Global RCR Parameter Estimates: Estimate Std. Error 2.5% 97.5% lambdastar thetastar lambda The lambda(theta) function has critical points at: limit localmax thetastar- thetastar+ limit -1.00e e e e e+100 Estimated bounds on theta for given bounds on lambda: lambda_l lambda_h theta_l theta_h 2.5% 97.5% Confidence intervals calculated using conservative method. The printout above has 3 sections. 1. The section titled Global RCR Parameter Estimates provides estimates of λ *, θ * and θ(0) as defined in the paper, along with standard errors and confidence intervals. 2. The section titled The lambda(theta) function has critical points at: identifies (to an approximation) all points at which the estimated λ(θ) function has either a discontinuity or a change in direction. 3. The section titled Estimated bounds on theta for given bounds on lambda provides estimates of *θ L,θ H ] for a few common assumptions about λ in *λ L,λ H ]. 2.2 Additional estimation options The RCR function has several optional inputs that may be necessary for particular applications. The example.r file includes an example that uses all of these options to produce the results for the first column in Table 3 of the paper. Choosing a custom range for λ The optional argument Lambda is a J-by-2 matrix in which each row represents a value of *λ L,λ H ] for which to estimate *θ L, θ H ]. For example, if you want to estimate *θ L,θ H ] for λ in *0,0.2+ and for λ in (-,0], execute the command: rcr(x,y,z,lambda=matrix(c(0,-inf,0.2,0),ncol=2)) By default, Lambda is set to include a few convenient values. Cluster-robust standard errors By default, standard errors are calculated under the assumption that the data are independent and identically distributed. To use cluster-robust standard errors use the optional argument cluster. For example, you might execute:

5 rcr(x,y,z,cluster=clustervar) where clustervar is the name of an n-vector of cluster identifiers. Confidence interval options The optional argument level can be used to select an alternative asymptotic level for the calculation of confidence intervals. For example, if you want 99% confidence intervals (the default is 95%), execute the command: rcr(x,y,z,level=0.99) The level argument operates the same way as in the generic R function confint. The optional argument citype is a (case-insensitive) text string indicating the method to use when calculating confidence intervals for θ. Several alternatives are currently supported: Conservative: Constructs a confidence interval for θ from the lower bound for the confidence interval of θ L and the upper bound for the confidence interval of θ H. Imbens and Manski (2004) show that this approach can be too conservative when θ H - θ L is relatively large. Imbens-Manski: Uses the method proposed by Imbens and Manski (2004). Stoye: Uses the method proposed by Stoye (2008). For example, if you want to use the Imbens-Manski method, execute the command: rcr(x,y,z,citype= Imbens-Manski ) The default uses the conservative method. 3 Creating plots Plots of the estimated λ(θ) function can be created by calling the generic function plot on the results of the rcr function. For example, executing the command: plot(rcr(x,y,z)) will generate a plot. The plot produced with the default options will probably not look good, but more informative plots can be made using the optional arguments below. Changing the range of values to plot xlim is a 2-vector giving the range of values to plot on the horizontal (x) axis. ylim is a 2-vector giving the range of values to plot on the vertical (y) axis. Plotting [λ L,λ H ] and [θ L,θ H ] The optional argument Lambda is a 2-vector giving a range for *λ L,λ H ] for which to plot the estimated *θ L,θ H ]. The default (Lambda=NULL) is to simply not plot such an estimate.

6 Including a legend The optional argument placelegend tells plot where (if anywhere) to place a legend for the plot. This option is passed directly to R s legend command. Valid options include topleft, topright, etc. See the R documentation for the legend command for more details. The default (placelegend=false) is to have no legend at all. Choosing plot elements These optional arguments take logical values, and are used to determine whether particular statistics are plotted. plotlambdafunction indicates whether to plot the estimated λ(θ) function (default TRUE). plotthetastar indicates whether to plot the estimated value of θ* (default TRUE) plotlambdastar indicates whether to plot the estimated value of λ* (default TRUE) Confidence intervals The optional argument plotci indicates whether to plot confidence intervals for the estimated Θ(Λ) (default is FALSE). The optional argument plotlambdaci indicates whether to plot confidence intervals for the estimated λ(θ) function (default is FALSE). The optional argument level indicates the confidence level to use. The optional argument citype indicates the type of confidence interval to estimate for θ (see the explanation of citype in Section 2.2 for details). Advanced options The adjustylim argument is a logical argument that tells plot whether to adjust the range of the vertical axis to look nice. It doesn t work very well yet. The default is (adjustylim=false). The gridsize argument indicates the number of points at which to estimate the λ(θ) function. The default is (gridsize=100) The colorscheme argument is a vector of colors to be used in the plot. See the built-in R function colors() for a list of available colors. The default is (colorscheme= c("black","blue","gray","green","lightgreen")) In addition to these options, many of the standard optional arguments to R s plot function are accepted. 4 Notes for advanced users 4.1 Class descriptions Like many estimation methods programmed in R, this program has an object-oriented design. That is,

7 Data tends to be packaged into (potentially elaborate) structures called objects. Each object is a member of one or more classes. An object s class dictates its structure. There are numerous generic functions (e.g., print) that can be called on all sorts of different objects but whose actual behavior ( method ) depends on the class of the object that has been passed to it. In order to understand how this program works it is important to know the main classes, the structure of objects in each class, and the methods available. rcr How they are created: Objects of class rcr are created with the rcr function. What they are: A rcr object is a list with a particular set of elements that describe the results from RCR estimation: Several parameter objects (see below for explanation of parameter objects) named o moments (this is the vector of sample moments from which all other parameters are calculated) o thetastar (the parameter θ* described in the paper) o lambdastar (the parameter λ* described in the paper) o lambda0 (the parameter λ(0) described in the paper) o thetasegments (the set of θ values at which λ(θ) is discontinuous or switches direction). A function named lambda (the function λ(θ) described in the paper). etc. What can be done with them: There are rcr-specific methods for the generic functions print, summary, and plot. There is also a function is.rcr that tests whether an object is a (valid) rcr object. parameter How they are created: Parameter objects are created with the function parameter. This function is used mostly internally. What they are: A parameter object is a list that describes a vector of parameter estimates, including its covariance matrix. Specifically it is a list with elements: A k-vector named E that gives the actual estimate. A j-by-j matrix named V that gives the covariance matrix of moments A k-by-j matrix named gradient that gives the gradient of the estimate with respect to moments.

8 What can be done with them: It has methods for the generic functions print, confint, and vcov. There is also a function parameter for the creation of parameter objects, and a function is.parameter() to test whether an object is a parameter object. Finally, two or more parameter objects can be concatenated into a single object using a special method for the generic function c(). Theta How they are created: Theta objects are created by the function estimatetheta. This function is mostly used internally. What they are: A Theta object is a special kind of parameter object that specifically describes the pair of parameter estimates *θ L,θ H ]. It inherits from the parameter class. What can be done with them: Anything that can be done for a parameter object can be done with a Theta object. In addition, Theta objects have methods for the generic functions confint and summary. 4.2 A note on standard error estimates Standard error estimates for most parameters of interest are based on application of the delta method. That is, the parameter of interest is a (usually) differentiable function h(m), where M is some easily calculated vector of asymptotically normal summary statistics with easily-estimated covariance matrix. Standard errors are estimated by application of the formula where the derivative in the above expression is approximated numerically using the finite difference method. For example, if M were a scalar, the finite difference method would approximate the derivative by: where ε is some small positive number. Unfortunately, it is not easy to determine in advance how big ε should be to get a good approximation. In principle, the approximation above gets better with smaller ε, but rounding error in the calculation of h(m) becomes a problem if ε is too small. The current value the program uses for ε is stored in bkoptions$eps, and its default value is It is a good idea to try out somewhat smaller and somewhat larger values to see if the standard error estimates are sensitive to the choice of value.

9 5 Version History Version 0.9 (6/29/2008)

10 References Imbens, Guido and Charles F. Manski, Confidence intervals for partially identified parameters. Econometrica 72: Krauth, Brian, Bounding a linear causal effect using relative correlation restrictions. Working paper, Simon Fraser University. Available online at Stoye, Jörg, More on confidence intervals for partially identified parameters. CEMMAP Working Paper. Available online at

Package rdd. March 14, 2016

Package rdd. March 14, 2016 Maintainer Drew Dimmery Author Drew Dimmery Version 0.57 License Apache License (== 2.0) Title Regression Discontinuity Estimation Package rdd March 14, 2016 Provides the tools to undertake

More information

Logical operators: R provides an extensive list of logical operators. These include

Logical operators: R provides an extensive list of logical operators. These include meat.r: Explanation of code Goals of code: Analyzing a subset of data Creating data frames with specified X values Calculating confidence and prediction intervals Lists and matrices Only printing a few

More information

Fathom Dynamic Data TM Version 2 Specifications

Fathom Dynamic Data TM Version 2 Specifications Data Sources Fathom Dynamic Data TM Version 2 Specifications Use data from one of the many sample documents that come with Fathom. Enter your own data by typing into a case table. Paste data from other

More information

Week 4: Simple Linear Regression II

Week 4: Simple Linear Regression II Week 4: Simple Linear Regression II Marcelo Coca Perraillon University of Colorado Anschutz Medical Campus Health Services Research Methods I HSMP 7607 2017 c 2017 PERRAILLON ARR 1 Outline Algebraic properties

More information

Machine Learning and Computational Statistics, Spring 2015 Homework 1: Ridge Regression and SGD

Machine Learning and Computational Statistics, Spring 2015 Homework 1: Ridge Regression and SGD Machine Learning and Computational Statistics, Spring 2015 Homework 1: Ridge Regression and SGD Due: Friday, February 6, 2015, at 4pm (Submit via NYU Classes) Instructions: Your answers to the questions

More information

Package endogenous. October 29, 2016

Package endogenous. October 29, 2016 Package endogenous October 29, 2016 Type Package Title Classical Simultaneous Equation Models Version 1.0 Date 2016-10-25 Maintainer Andrew J. Spieker Description Likelihood-based

More information

1. (20%) a) Calculate and plot the impulse response functions for the model. u1t 1 u 2t 1

1. (20%) a) Calculate and plot the impulse response functions for the model. u1t 1 u 2t 1 ECONOMETRICS II, Fall 2016 Bent E. Sørensen Final Exam. December 2. 7 questions. 1. 20% a Calculate and plot the impulse response functions for the model x1t x 2t = u1t u 2t 1.5.3.2 u1t 1 u 2t 1 1 2 0.5

More information

Package CausalGAM. October 19, 2017

Package CausalGAM. October 19, 2017 Package CausalGAM October 19, 2017 Version 0.1-4 Date 2017-10-16 Title Estimation of Causal Effects with Generalized Additive Models Author Adam Glynn , Kevin Quinn

More information

Package MatchingFrontier

Package MatchingFrontier Version 0.15.28 Date 2015-01-20 Type Package Package MatchingFrontier March 1, 2015 Title Computation of the Balance - Sample Size Frontier in Matching Methods for Causal Inference Author Gary King, Christopher

More information

Machine Learning and Computational Statistics, Spring 2016 Homework 1: Ridge Regression and SGD

Machine Learning and Computational Statistics, Spring 2016 Homework 1: Ridge Regression and SGD Machine Learning and Computational Statistics, Spring 2016 Homework 1: Ridge Regression and SGD Due: Friday, February 5, 2015, at 6pm (Submit via NYU Classes) Instructions: Your answers to the questions

More information

Resources for statistical assistance. Quantitative covariates and regression analysis. Methods for predicting continuous outcomes.

Resources for statistical assistance. Quantitative covariates and regression analysis. Methods for predicting continuous outcomes. Resources for statistical assistance Quantitative covariates and regression analysis Carolyn Taylor Applied Statistics and Data Science Group (ASDa) Department of Statistics, UBC January 24, 2017 Department

More information

CSSCR Excel Intermediate 4/13/06 GH Page 1 of 23 INTERMEDIATE EXCEL

CSSCR Excel Intermediate 4/13/06 GH Page 1 of 23 INTERMEDIATE EXCEL CSSCR Excel Intermediate 4/13/06 GH Page 1 of 23 INTERMEDIATE EXCEL This document is for those who already know the basics of spreadsheets and have worked with either Excel for Windows or Excel for Macintosh.

More information

A Basic Guide to Using Matlab in Econ 201FS

A Basic Guide to Using Matlab in Econ 201FS A Basic Guide to Using Matlab in Econ 201FS Matthew Rognlie February 1, 2010 Contents 1 Finding Matlab 2 2 Getting Started 2 3 Basic Data Manipulation 3 4 Plotting and Finding Returns 4 4.1 Basic Price

More information

Heteroskedasticity and Homoskedasticity, and Homoskedasticity-Only Standard Errors

Heteroskedasticity and Homoskedasticity, and Homoskedasticity-Only Standard Errors Heteroskedasticity and Homoskedasticity, and Homoskedasticity-Only Standard Errors (Section 5.4) What? Consequences of homoskedasticity Implication for computing standard errors What do these two terms

More information

PS 6: Regularization. PART A: (Source: HTF page 95) The Ridge regression problem is:

PS 6: Regularization. PART A: (Source: HTF page 95) The Ridge regression problem is: Economics 1660: Big Data PS 6: Regularization Prof. Daniel Björkegren PART A: (Source: HTF page 95) The Ridge regression problem is: : β "#$%& = argmin (y # β 2 x #4 β 4 ) 6 6 + λ β 4 #89 Consider the

More information

Quick look at the margins command

Quick look at the margins command Quick look at the margins command Jean-Philippe Gauvin jean-philippe.gauvin@umontreal.ca October 9, 22 Abstract In this document I try to give an overview of the margins command in Stata. I start with

More information

Speeding Up the ARDL Estimation Command:

Speeding Up the ARDL Estimation Command: Speeding Up the ARDL Estimation Command: A Case Study in Efficient Programming in Stata and Mata Sebastian Kripfganz 1 Daniel C. Schneider 2 1 University of Exeter 2 Max Planck Institute for Demographic

More information

2 Second Derivatives. As we have seen, a function f (x, y) of two variables has four different partial derivatives: f xx. f yx. f x y.

2 Second Derivatives. As we have seen, a function f (x, y) of two variables has four different partial derivatives: f xx. f yx. f x y. 2 Second Derivatives As we have seen, a function f (x, y) of two variables has four different partial derivatives: (x, y), (x, y), f yx (x, y), (x, y) It is convenient to gather all four of these into

More information

Set up of the data is similar to the Randomized Block Design situation. A. Chang 1. 1) Setting up the data sheet

Set up of the data is similar to the Randomized Block Design situation. A. Chang 1. 1) Setting up the data sheet Repeated Measure Analysis (Univariate Mixed Effect Model Approach) (Treatment as the Fixed Effect and the Subject as the Random Effect) (This univariate approach can be used for randomized block design

More information

You are to turn in the following three graphs at the beginning of class on Wednesday, January 21.

You are to turn in the following three graphs at the beginning of class on Wednesday, January 21. Computer Tools for Data Analysis & Presentation Graphs All public machines on campus are now equipped with Word 2010 and Excel 2010. Although fancier graphical and statistical analysis programs exist,

More information

Standard Errors in OLS Luke Sonnet

Standard Errors in OLS Luke Sonnet Standard Errors in OLS Luke Sonnet Contents Variance-Covariance of ˆβ 1 Standard Estimation (Spherical Errors) 2 Robust Estimation (Heteroskedasticity Constistent Errors) 4 Cluster Robust Estimation 7

More information

Package mvprobit. November 2, 2015

Package mvprobit. November 2, 2015 Version 0.1-8 Date 2015-11-02 Title Multivariate Probit Models Package mvprobit November 2, 2015 Author Arne Henningsen Maintainer Arne Henningsen

More information

Conditional Volatility Estimation by. Conditional Quantile Autoregression

Conditional Volatility Estimation by. Conditional Quantile Autoregression International Journal of Mathematical Analysis Vol. 8, 2014, no. 41, 2033-2046 HIKARI Ltd, www.m-hikari.com http://dx.doi.org/10.12988/ijma.2014.47210 Conditional Volatility Estimation by Conditional Quantile

More information

TI Technology Guide for Is leisure time really shrinking?

TI Technology Guide for Is leisure time really shrinking? Creating Lists of Data, Displaying the Graph, Using the Regression Capabilities of the Calculator, Finding the Intersection Between Graphs, and Finding the Maximum of a Graph Creating Lists of Data To

More information

06: Logistic Regression

06: Logistic Regression 06_Logistic_Regression 06: Logistic Regression Previous Next Index Classification Where y is a discrete value Develop the logistic regression algorithm to determine what class a new input should fall into

More information

Microsoft Word for Report-Writing (2016 Version)

Microsoft Word for Report-Writing (2016 Version) Microsoft Word for Report-Writing (2016 Version) Microsoft Word is a versatile, widely-used tool for producing presentation-quality documents. Most students are well-acquainted with the program for generating

More information

10.2 Basic Concepts of Limits

10.2 Basic Concepts of Limits 10.2 Basic Concepts of Limits Question 1: How do you evaluate a limit from a table? Question 2: How do you evaluate a limit from a graph? In this chapter, we ll examine the concept of a limit. in its simplest

More information

Serial Correlation and Heteroscedasticity in Time series Regressions. Econometric (EC3090) - Week 11 Agustín Bénétrix

Serial Correlation and Heteroscedasticity in Time series Regressions. Econometric (EC3090) - Week 11 Agustín Bénétrix Serial Correlation and Heteroscedasticity in Time series Regressions Econometric (EC3090) - Week 11 Agustín Bénétrix 1 Properties of OLS with serially correlated errors OLS still unbiased and consistent

More information

Detailed Explanation of Stata Code for a Marginal Effect Plot for X

Detailed Explanation of Stata Code for a Marginal Effect Plot for X Detailed Explanation of Stata Code for a Marginal Effect Plot for X Below, I go through the Stata code for creating a marginal effect plot for X for an interaction model with the following basic form:

More information

Bivariate Linear Regression James M. Murray, Ph.D. University of Wisconsin - La Crosse Updated: October 04, 2017

Bivariate Linear Regression James M. Murray, Ph.D. University of Wisconsin - La Crosse Updated: October 04, 2017 Bivariate Linear Regression James M. Murray, Ph.D. University of Wisconsin - La Crosse Updated: October 4, 217 PDF file location: http://www.murraylax.org/rtutorials/regression_intro.pdf HTML file location:

More information

Pharmacokinetics and pharmacodynamics Peter Dalgaard April/May The nls function

Pharmacokinetics and pharmacodynamics Peter Dalgaard April/May The nls function Pharmacokinetics and pharmacodynamics Peter Dalgaard April/May 2003 The nls function 1 12 Overview 1 Overview Simple usage 1 Overview Simple usage Summary output 1 Overview Simple usage Summary output

More information

Geostatistics 2D GMS 7.0 TUTORIALS. 1 Introduction. 1.1 Contents

Geostatistics 2D GMS 7.0 TUTORIALS. 1 Introduction. 1.1 Contents GMS 7.0 TUTORIALS 1 Introduction Two-dimensional geostatistics (interpolation) can be performed in GMS using the 2D Scatter Point module. The module is used to interpolate from sets of 2D scatter points

More information

Robust Linear Regression (Passing- Bablok Median-Slope)

Robust Linear Regression (Passing- Bablok Median-Slope) Chapter 314 Robust Linear Regression (Passing- Bablok Median-Slope) Introduction This procedure performs robust linear regression estimation using the Passing-Bablok (1988) median-slope algorithm. Their

More information

Quick Start Guide Jacob Stolk PhD Simone Stolk MPH November 2018

Quick Start Guide Jacob Stolk PhD Simone Stolk MPH November 2018 Quick Start Guide Jacob Stolk PhD Simone Stolk MPH November 2018 Contents Introduction... 1 Start DIONE... 2 Load Data... 3 Missing Values... 5 Explore Data... 6 One Variable... 6 Two Variables... 7 All

More information

Package MIICD. May 27, 2017

Package MIICD. May 27, 2017 Type Package Package MIICD May 27, 2017 Title Multiple Imputation for Interval Censored Data Version 2.4 Depends R (>= 2.13.0) Date 2017-05-27 Maintainer Marc Delord Implements multiple

More information

MAT 275 Laboratory 1 Introduction to MATLAB

MAT 275 Laboratory 1 Introduction to MATLAB MATLAB sessions: Laboratory 1 1 MAT 275 Laboratory 1 Introduction to MATLAB MATLAB is a computer software commonly used in both education and industry to solve a wide range of problems. This Laboratory

More information

Edge detection. Convert a 2D image into a set of curves. Extracts salient features of the scene More compact than pixels

Edge detection. Convert a 2D image into a set of curves. Extracts salient features of the scene More compact than pixels Edge Detection Edge detection Convert a 2D image into a set of curves Extracts salient features of the scene More compact than pixels Origin of Edges surface normal discontinuity depth discontinuity surface

More information

Package ArCo. November 5, 2017

Package ArCo. November 5, 2017 Title Artificial Counterfactual Package Version 0.3-1 Date 2017-11-05 Package ArCo November 5, 2017 Maintainer Gabriel F. R. Vasconcelos BugReports https://github.com/gabrielrvsc/arco/issues

More information

Session 2: Fixed and Random Effects Estimation

Session 2: Fixed and Random Effects Estimation Session 2: Fixed and Random Effects Estimation Principal, Developing Trade Consultants Ltd. ARTNeT/RIS Capacity Building Workshop on the Use of Gravity Modeling Thursday, November 10, 2011 1 Outline Fixed

More information

Programming Exercise 1: Linear Regression

Programming Exercise 1: Linear Regression Programming Exercise 1: Linear Regression Machine Learning Introduction In this exercise, you will implement linear regression and get to see it work on data. Before starting on this programming exercise,

More information

Lesson 20: Four Interesting Transformations of Functions

Lesson 20: Four Interesting Transformations of Functions Student Outcomes Students apply their understanding of transformations of functions and their graphs to piecewise functions. Lesson Notes In Lessons 17 19 students study translations and scalings of functions

More information

Final Exam Study Guide

Final Exam Study Guide Final Exam Study Guide Exam Window: 28th April, 12:00am EST to 30th April, 11:59pm EST Description As indicated in class the goal of the exam is to encourage you to review the material from the course.

More information

Lesson 18-1 Lesson Lesson 18-1 Lesson Lesson 18-2 Lesson 18-2

Lesson 18-1 Lesson Lesson 18-1 Lesson Lesson 18-2 Lesson 18-2 Topic 18 Set A Words survey data Topic 18 Set A Words Lesson 18-1 Lesson 18-1 sample line plot Lesson 18-1 Lesson 18-1 frequency table bar graph Lesson 18-2 Lesson 18-2 Instead of making 2-sided copies

More information

Dealing with Data in Excel 2013/2016

Dealing with Data in Excel 2013/2016 Dealing with Data in Excel 2013/2016 Excel provides the ability to do computations and graphing of data. Here we provide the basics and some advanced capabilities available in Excel that are useful for

More information

Edge Detection. Announcements. Edge detection. Origin of Edges. Mailing list: you should have received messages

Edge Detection. Announcements. Edge detection. Origin of Edges. Mailing list: you should have received messages Announcements Mailing list: csep576@cs.washington.edu you should have received messages Project 1 out today (due in two weeks) Carpools Edge Detection From Sandlot Science Today s reading Forsyth, chapters

More information

Course Number 432/433 Title Algebra II (A & B) H Grade # of Days 120

Course Number 432/433 Title Algebra II (A & B) H Grade # of Days 120 Whitman-Hanson Regional High School provides all students with a high- quality education in order to develop reflective, concerned citizens and contributing members of the global community. Course Number

More information

Also, for all analyses, two other files are produced upon program completion.

Also, for all analyses, two other files are produced upon program completion. MIXOR for Windows Overview MIXOR is a program that provides estimates for mixed-effects ordinal (and binary) regression models. This model can be used for analysis of clustered or longitudinal (i.e., 2-level)

More information

Package texteffect. November 27, 2017

Package texteffect. November 27, 2017 Version 0.1 Date 2017-11-27 Package texteffect November 27, 2017 Title Discovering Latent Treatments in Text Corpora and Estimating Their Causal Effects Author Christian Fong

More information

Programming Exercise 4: Neural Networks Learning

Programming Exercise 4: Neural Networks Learning Programming Exercise 4: Neural Networks Learning Machine Learning Introduction In this exercise, you will implement the backpropagation algorithm for neural networks and apply it to the task of hand-written

More information

Creates a 1 X 1 matrix (scalar) with a value of 1 in the column 1, row 1 position and prints the matrix aaa in the command window.

Creates a 1 X 1 matrix (scalar) with a value of 1 in the column 1, row 1 position and prints the matrix aaa in the command window. EE 350L: Signals and Transforms Lab Spring 2007 Lab #1 - Introduction to MATLAB Lab Handout Matlab Software: Matlab will be the analytical tool used in the signals lab. The laboratory has network licenses

More information

Linear Regression. Problem: There are many observations with the same x-value but different y-values... Can t predict one y-value from x. d j.

Linear Regression. Problem: There are many observations with the same x-value but different y-values... Can t predict one y-value from x. d j. Linear Regression (*) Given a set of paired data, {(x 1, y 1 ), (x 2, y 2 ),..., (x n, y n )}, we want a method (formula) for predicting the (approximate) y-value of an observation with a given x-value.

More information

Class #15: Experiment Introduction to Matlab

Class #15: Experiment Introduction to Matlab Class #15: Experiment Introduction to Matlab Purpose: The objective of this experiment is to begin to use Matlab in our analysis of signals, circuits, etc. Background: Before doing this experiment, students

More information

Edge Detection. Today s reading. Cipolla & Gee on edge detection (available online) From Sandlot Science

Edge Detection. Today s reading. Cipolla & Gee on edge detection (available online) From Sandlot Science Edge Detection From Sandlot Science Today s reading Cipolla & Gee on edge detection (available online) Project 1a assigned last Friday due this Friday Last time: Cross-correlation Let be the image, be

More information

3 Nonlinear Regression

3 Nonlinear Regression CSC 4 / CSC D / CSC C 3 Sometimes linear models are not sufficient to capture the real-world phenomena, and thus nonlinear models are necessary. In regression, all such models will have the same basic

More information

Advanced Operations Research Prof. G. Srinivasan Department of Management Studies Indian Institute of Technology, Madras

Advanced Operations Research Prof. G. Srinivasan Department of Management Studies Indian Institute of Technology, Madras Advanced Operations Research Prof. G. Srinivasan Department of Management Studies Indian Institute of Technology, Madras Lecture 16 Cutting Plane Algorithm We shall continue the discussion on integer programming,

More information

Here is the data collected.

Here is the data collected. Introduction to Scientific Analysis of Data Using Spreadsheets. Computer spreadsheets are very powerful tools that are widely used in Business, Science, and Engineering to perform calculations and record,

More information

Example 1: Give the coordinates of the points on the graph.

Example 1: Give the coordinates of the points on the graph. Ordered Pairs Often, to get an idea of the behavior of an equation, we will make a picture that represents the solutions to the equation. A graph gives us that picture. The rectangular coordinate plane,

More information

GRETL FOR TODDLERS!! CONTENTS. 1. Access to the econometric software A new data set: An existent data set: 3

GRETL FOR TODDLERS!! CONTENTS. 1. Access to the econometric software A new data set: An existent data set: 3 GRETL FOR TODDLERS!! JAVIER FERNÁNDEZ-MACHO CONTENTS 1. Access to the econometric software 3 2. Loading and saving data: the File menu 3 2.1. A new data set: 3 2.2. An existent data set: 3 2.3. Importing

More information

Excel 2010 Worksheet 3. Table of Contents

Excel 2010 Worksheet 3. Table of Contents Table of Contents Graphs and Charts... 1 Chart Elements... 1 Column Charts:... 2 Pie Charts:... 6 Line graph 1:... 8 Line Graph 2:... 10 Scatter Charts... 12 Functions... 13 Calculate Averages (Mean):...

More information

Single Slit Diffraction

Single Slit Diffraction Name: Date: PC1142 Physics II Single Slit Diffraction 5 Laboratory Worksheet Part A: Qualitative Observation of Single Slit Diffraction Pattern L = a 2y 0.20 mm 0.02 mm Data Table 1 Question A-1: Describe

More information

Econometric Tools 1: Non-Parametric Methods

Econometric Tools 1: Non-Parametric Methods University of California, Santa Cruz Department of Economics ECON 294A (Fall 2014) - Stata Lab Instructor: Manuel Barron 1 Econometric Tools 1: Non-Parametric Methods 1 Introduction This lecture introduces

More information

Integrated Math I. IM1.1.3 Understand and use the distributive, associative, and commutative properties.

Integrated Math I. IM1.1.3 Understand and use the distributive, associative, and commutative properties. Standard 1: Number Sense and Computation Students simplify and compare expressions. They use rational exponents and simplify square roots. IM1.1.1 Compare real number expressions. IM1.1.2 Simplify square

More information

MATH 1A MIDTERM 1 (8 AM VERSION) SOLUTION. (Last edited October 18, 2013 at 5:06pm.) lim

MATH 1A MIDTERM 1 (8 AM VERSION) SOLUTION. (Last edited October 18, 2013 at 5:06pm.) lim MATH A MIDTERM (8 AM VERSION) SOLUTION (Last edited October 8, 03 at 5:06pm.) Problem. (i) State the Squeeze Theorem. (ii) Prove the Squeeze Theorem. (iii) Using a carefully justified application of the

More information

Multimedia Computing: Algorithms, Systems, and Applications: Edge Detection

Multimedia Computing: Algorithms, Systems, and Applications: Edge Detection Multimedia Computing: Algorithms, Systems, and Applications: Edge Detection By Dr. Yu Cao Department of Computer Science The University of Massachusetts Lowell Lowell, MA 01854, USA Part of the slides

More information

Section 3.2: Multiple Linear Regression II. Jared S. Murray The University of Texas at Austin McCombs School of Business

Section 3.2: Multiple Linear Regression II. Jared S. Murray The University of Texas at Austin McCombs School of Business Section 3.2: Multiple Linear Regression II Jared S. Murray The University of Texas at Austin McCombs School of Business 1 Multiple Linear Regression: Inference and Understanding We can answer new questions

More information

A. Using the data provided above, calculate the sampling variance and standard error for S for each week s data.

A. Using the data provided above, calculate the sampling variance and standard error for S for each week s data. WILD 502 Lab 1 Estimating Survival when Animal Fates are Known Today s lab will give you hands-on experience with estimating survival rates using logistic regression to estimate the parameters in a variety

More information

CPIB SUMMER SCHOOL 2011: INTRODUCTION TO BIOLOGICAL MODELLING

CPIB SUMMER SCHOOL 2011: INTRODUCTION TO BIOLOGICAL MODELLING CPIB SUMMER SCHOOL 2011: INTRODUCTION TO BIOLOGICAL MODELLING 1 Getting started Practical 4: Spatial Models in MATLAB Nick Monk Matlab files for this practical (Mfiles, with suffix.m ) can be found at:

More information

GCSE CCEA GCSE EXCEL 2010 USER GUIDE. Business and Communication Systems

GCSE CCEA GCSE EXCEL 2010 USER GUIDE. Business and Communication Systems GCSE CCEA GCSE EXCEL 2010 USER GUIDE Business and Communication Systems For first teaching from September 2017 Contents Page Define the purpose and uses of a spreadsheet... 3 Define a column, row, and

More information

Math January, Non-rigid transformations. Parent function New function Scale factor

Math January, Non-rigid transformations. Parent function New function Scale factor Non-rigid transformations In non-rigid transformations, the shape of a function is modified, either stretched or shrunk. We will call the number which tells us how much it is changed the scale factor,

More information

The first thing we ll need is some numbers. I m going to use the set of times and drug concentration levels in a patient s bloodstream given below.

The first thing we ll need is some numbers. I m going to use the set of times and drug concentration levels in a patient s bloodstream given below. Graphing in Excel featuring Excel 2007 1 A spreadsheet can be a powerful tool for analyzing and graphing data, but it works completely differently from the graphing calculator that you re used to. If you

More information

Study Guide. Module 1. Key Terms

Study Guide. Module 1. Key Terms Study Guide Module 1 Key Terms general linear model dummy variable multiple regression model ANOVA model ANCOVA model confounding variable squared multiple correlation adjusted squared multiple correlation

More information

Total Number of Students in US (millions)

Total Number of Students in US (millions) The goal of this technology assignment is to graph a formula on your calculator and in Excel. This assignment assumes that you have a TI 84 or similar calculator and are using Excel 2007. The formula you

More information

UP School of Statistics Student Council Education and Research

UP School of Statistics Student Council Education and Research w UP School of Statistics Student Council Education and Research erho.weebly.com 0 erhomyhero@gmail.com f /erhoismyhero t @erhomyhero S133_HOA_001 Statistics 133 Bayesian Statistical Inference Use of R

More information

A User Manual for the Multivariate MLE Tool. Before running the main multivariate program saved in the SAS file Part2-Main.sas,

A User Manual for the Multivariate MLE Tool. Before running the main multivariate program saved in the SAS file Part2-Main.sas, A User Manual for the Multivariate MLE Tool Before running the main multivariate program saved in the SAS file Part-Main.sas, the user must first compile the macros defined in the SAS file Part-Macros.sas

More information

Applied Calculus. Lab 1: An Introduction to R

Applied Calculus. Lab 1: An Introduction to R 1 Math 131/135/194, Fall 2004 Applied Calculus Profs. Kaplan & Flath Macalester College Lab 1: An Introduction to R Goal of this lab To begin to see how to use R. What is R? R is a computer package for

More information

Introduction to Mplus

Introduction to Mplus Introduction to Mplus May 12, 2010 SPONSORED BY: Research Data Centre Population and Life Course Studies PLCS Interdisciplinary Development Initiative Piotr Wilk piotr.wilk@schulich.uwo.ca OVERVIEW Mplus

More information

Lasso. November 14, 2017

Lasso. November 14, 2017 Lasso November 14, 2017 Contents 1 Case Study: Least Absolute Shrinkage and Selection Operator (LASSO) 1 1.1 The Lasso Estimator.................................... 1 1.2 Computation of the Lasso Solution............................

More information

Data Analysis and Solver Plugins for KSpread USER S MANUAL. Tomasz Maliszewski

Data Analysis and Solver Plugins for KSpread USER S MANUAL. Tomasz Maliszewski Data Analysis and Solver Plugins for KSpread USER S MANUAL Tomasz Maliszewski tmaliszewski@wp.pl Table of Content CHAPTER 1: INTRODUCTION... 3 1.1. ABOUT DATA ANALYSIS PLUGIN... 3 1.3. ABOUT SOLVER PLUGIN...

More information

Equities and Fixed Income. Introduction Manual

Equities and Fixed Income. Introduction Manual Finance Data Thomson Reuters Eikon Equities and Fixed Income Introduction Manual Date Author 01-03-2017 Nicky Zaugg 17-10-2017 Nicky Zaugg Contents 1. Introduction... 3 1.1 When do I use Eikon?... 3 1.2

More information

Bootstrap confidence intervals Class 24, Jeremy Orloff and Jonathan Bloom

Bootstrap confidence intervals Class 24, Jeremy Orloff and Jonathan Bloom 1 Learning Goals Bootstrap confidence intervals Class 24, 18.05 Jeremy Orloff and Jonathan Bloom 1. Be able to construct and sample from the empirical distribution of data. 2. Be able to explain the bootstrap

More information

Unit 1, Lesson 1: Moving in the Plane

Unit 1, Lesson 1: Moving in the Plane Unit 1, Lesson 1: Moving in the Plane Let s describe ways figures can move in the plane. 1.1: Which One Doesn t Belong: Diagrams Which one doesn t belong? 1.2: Triangle Square Dance m.openup.org/1/8-1-1-2

More information

MS Office for Engineers

MS Office for Engineers MS Office for Engineers Lesson 4 Excel 2 Pre-reqs/Technical Skills Basic knowledge of Excel Completion of Excel 1 tutorial Basic computer use Expectations Read lesson material Implement steps in software

More information

Mastery. PRECALCULUS Student Learning Targets

Mastery. PRECALCULUS Student Learning Targets PRECALCULUS Student Learning Targets Big Idea: Sequences and Series 1. I can describe a sequence as a function where the domain is the set of natural numbers. Connections (Pictures, Vocabulary, Definitions,

More information

Incorporating Known Pathways into Gene Clustering Algorithms for Genetic Expression Data

Incorporating Known Pathways into Gene Clustering Algorithms for Genetic Expression Data Incorporating Known Pathways into Gene Clustering Algorithms for Genetic Expression Data Ryan Atallah, John Ryan, David Aeschlimann December 14, 2013 Abstract In this project, we study the problem of classifying

More information

Package swcrtdesign. February 12, 2018

Package swcrtdesign. February 12, 2018 Package swcrtdesign February 12, 2018 Type Package Title Stepped Wedge Cluster Randomized Trial (SW CRT) Design Version 2.2 Date 2018-2-4 Maintainer Jim Hughes Author Jim Hughes and Navneet

More information

GRAPHS AND STATISTICS Residuals Common Core Standard

GRAPHS AND STATISTICS Residuals Common Core Standard B Graphs and Statistics, Lesson 7, Residuals (r. 2018) GRAPHS AND STATISTICS Residuals Common Core Standard Next Generation Standard S-ID.B.6b Informally assess the fit of a function by plotting and analyzing

More information

FUNCTIONS AND MODELS

FUNCTIONS AND MODELS 1 FUNCTIONS AND MODELS FUNCTIONS AND MODELS In this section, we assume that you have access to a graphing calculator or a computer with graphing software. FUNCTIONS AND MODELS 1.4 Graphing Calculators

More information

Module 2: Single Step Methods Lecture 4: The Euler Method. The Lecture Contains: The Euler Method. Euler's Method (Analytical Interpretations)

Module 2: Single Step Methods Lecture 4: The Euler Method. The Lecture Contains: The Euler Method. Euler's Method (Analytical Interpretations) The Lecture Contains: The Euler Method Euler's Method (Analytical Interpretations) An Analytical Example file:///g /Numerical_solutions/lecture4/4_1.htm[8/26/2011 11:14:40 AM] We shall now describe methods

More information

predict and Friends: Common Methods for Predictive Models in R , Spring 2015 Handout No. 1, 25 January 2015

predict and Friends: Common Methods for Predictive Models in R , Spring 2015 Handout No. 1, 25 January 2015 predict and Friends: Common Methods for Predictive Models in R 36-402, Spring 2015 Handout No. 1, 25 January 2015 R has lots of functions for working with different sort of predictive models. This handout

More information

In other words, we want to find the domain points that yield the maximum or minimum values (extrema) of the function.

In other words, we want to find the domain points that yield the maximum or minimum values (extrema) of the function. 1 The Lagrange multipliers is a mathematical method for performing constrained optimization of differentiable functions. Recall unconstrained optimization of differentiable functions, in which we want

More information

1) Find. a) b) c) d) e) 2) The function g is defined by the formula. Find the slope of the tangent line at x = 1. a) b) c) e) 3) Find.

1) Find. a) b) c) d) e) 2) The function g is defined by the formula. Find the slope of the tangent line at x = 1. a) b) c) e) 3) Find. 1 of 7 1) Find 2) The function g is defined by the formula Find the slope of the tangent line at x = 1. 3) Find 5 1 The limit does not exist. 4) The given function f has a removable discontinuity at x

More information

Fall 2017: Numerical Methods I Assignment 1 (due Sep. 21, 2017)

Fall 2017: Numerical Methods I Assignment 1 (due Sep. 21, 2017) MATH-GA 2010.001/CSCI-GA 2420.001, Georg Stadler (NYU Courant) Fall 2017: Numerical Methods I Assignment 1 (due Sep. 21, 2017) Objectives. This class is for you and you should try to get the most out of

More information

Mixture Models and the EM Algorithm

Mixture Models and the EM Algorithm Mixture Models and the EM Algorithm Padhraic Smyth, Department of Computer Science University of California, Irvine c 2017 1 Finite Mixture Models Say we have a data set D = {x 1,..., x N } where x i is

More information

Week 10: Heteroskedasticity II

Week 10: Heteroskedasticity II Week 10: Heteroskedasticity II Marcelo Coca Perraillon University of Colorado Anschutz Medical Campus Health Services Research Methods I HSMP 7607 2017 c 2017 PERRAILLON ARR 1 Outline Dealing with heteroskedasticy

More information

Package StVAR. February 11, 2017

Package StVAR. February 11, 2017 Type Package Title Student's t Vector Autoregression (StVAR) Version 1.1 Date 2017-02-10 Author Niraj Poudyal Maintainer Niraj Poudyal Package StVAR February 11, 2017 Description Estimation

More information

Fitting D.A. Forsyth, CS 543

Fitting D.A. Forsyth, CS 543 Fitting D.A. Forsyth, CS 543 Fitting Choose a parametric object/some objects to represent a set of tokens Most interesting case is when criterion is not local can t tell whether a set of points lies on

More information

Select the Points You ll Use. Tech Assignment: Find a Quadratic Function for College Costs

Select the Points You ll Use. Tech Assignment: Find a Quadratic Function for College Costs In this technology assignment, you will find a quadratic function that passes through three of the points on each of the scatter plots you created in an earlier technology assignment. You will need the

More information

1) Complete problems 1-65 on pages You are encouraged to use the space provided.

1) Complete problems 1-65 on pages You are encouraged to use the space provided. Dear Accelerated Pre-Calculus Student (017-018), I am excited to have you enrolled in our class for next year! We will learn a lot of material and do so in a fairly short amount of time. This class will

More information

A First Tutorial in Stata

A First Tutorial in Stata A First Tutorial in Stata Stan Hurn Queensland University of Technology National Centre for Econometric Research www.ncer.edu.au Stan Hurn (NCER) Stata Tutorial 1 / 66 Table of contents 1 Preliminaries

More information

36-402/608 HW #1 Solutions 1/21/2010

36-402/608 HW #1 Solutions 1/21/2010 36-402/608 HW #1 Solutions 1/21/2010 1. t-test (20 points) Use fullbumpus.r to set up the data from fullbumpus.txt (both at Blackboard/Assignments). For this problem, analyze the full dataset together

More information