TUTORIAL: BASIC OPERATIONS

Size: px
Start display at page:

Download "TUTORIAL: BASIC OPERATIONS"

Transcription

1 TUTORIAL: BASIC OPERATIONS [1] AN EXERCISE ON HOW TO USE GAUSS On your computer, create a file folder called seminar. And download the two files called exer.txt and ols.prg from Dr. Ahn s website. Locate the two files in the folder seminar. Then, follow the steps described below. The pictures shown below would be slightly different from what you will actually see from your screens. 1. Double click on the GAUSS 6.0 icon. Then, you will see: 2. Type chdir c:\seminar (or a: if you use a floppy disk) on the command window and push the return button. By doing so, you can change your working directory to seminar Basic-1

2 3. Click on file/open. Then, you will see: Click on the Open button. Then, Basic-2

3 You can edit the program if you want. Once you finish editing, save the program using the save button on the screen. If you would like to create your own program, on command window, type, edit johndoe.prg (or other name) and push the return key. Then, you can get an empty window named johndoe.prg. Type your own codes on it! 4. To run the program, click on Action\Run Active File. To see the output file, click on file/open. When the list of the files appears, click on ols.out, which is an output file created by running ols.prg. Then, you will see: Basic-3

4 Basic-4

5 [2] SOME USEFUL COMMANDS (1) Reading data from a text file: The form of exer.txt: This data set contains 100 observations for 5 variables. To read this data set: load data[100,5] = exer.txt; y = all the entries on the first x2 = all the entries on the second x3 = data[.,3]; x4 = data[.,4]; x5 = data[.,5]; The last 5 lines define variable names. Basic-5

6 (2) Making Comments GAUSS does not execute any codes or between /* and */. Thus, you can make some comments in the or /*... */. (3) Matrix Operation Let A = [a ij ] and B = [b ij ] be conformable matrices. A*B: Product of A and B. A : Transpose of A. A B: Product of A and B. A[.,1]: The first column of A. A[1,.]: The first row of A. A[1,2]: The (1,2)th element of A. A[1:5,.]: The 1st, 2nd, 3rd, 4th and 5th rows of A. A[1 3,.]: The 1st and 3rd rows of A. inv(a): Inverse of A. invpd(a): Inverse of a positive definite matrix A. diag(a): n 1 vector of diagonal elements of an n n matrix A. sqrt(a): [ a ij ]. A^2: [a ij 2 ]. A B: Merge A and B vertically. A~B: Merge A and B horizontally. A.*.B: Kronecker Product of A and B. sumc(a): n 1 vector of sums of individual columns for an m n matrix A. 1 2 EX: 9 A = 3 4 sumc( A) = meanc(a): n 1 vector of means of individual columns for a m n matrix A. 1 2 EX: 3 A = 3 4 meanc( A) = stdc(a): n 1 vector of standard errors of individual columns for an mn matrix A. Suppose A = [a ij ] m n ; B = [b ij ] m n ; C = [c ij ] m 1 ; and d = scalar. A./B: [a ij /b ij ] (element by element operation). Basic-6

7 A./C: [a ij /c i ] (element by element operation). d-a: [d-a ij ]. d*a: [da ij ]. A/d: [a ij /d]. Generating a matrix of standard normally distributed random variables: rndns(t,k,dd): random matrix of t rows and k columns generated using dd as a seed number seed number. For uniformly distributed (between zero and 1) random variables use rndus[t,k,dd]. (4) Do Loop When you need to do the same job repeatedly, the following command would be useful: i = 1; do while i <= 100; : : : i = i + 1; endo; If you run the above commands, then the codes written on (: : :) are repeatedly executed. (5) Drawing Histogram Run the following command lines: library pgraph; graphset; {a1,a2,a3} = hist(storb, 50); If you execute the three lines, GAUSS draw a histogram for the variable named storb counting the frequencies for each of 50 categories. The variables named a1, a2 and a3 will contain some numeric information about the histogram (see the Gauss manual for detail). Basic-7

8 Or, you can run the following command lines: library pgraph; graphset; v = seqa(0,0.01,200); {a1,a2,a3} = hist(storb,v); The v is a vector of an additive sequence. The first argument in sega is the starting value. The second argument is increment, and the third argument is the number of elements in the sequence. Thus, the vector v is in the form of (0, 0.1, 0.2,..., 1.99). If you execute the above four lines, GAUSSLIGHT draw a histogram for the variable named storb counting the frequencies for the entries of v as breakpoints to be used to compute the frequencies. Basic-8

9 [3] OLS EXERCISE Program file: ols.prg /* ** OLS Program Data load data[100,5] = Define # of observations, # of regressors, X and tt = # of kk = # of y = data[.,1]; x2 = data[.,2]; x3 = data[.,3]; x4 = data[.,4]; x5 = data[.,5]; vny = name of the Dependent yy = y ; vny = xx = ones(tt,1)~x2~x3~x4~x5; vnx = {"cons", "x2", "x3", "x4", "x5" } Do not OLS using yy and b = invpd(xx'xx)*(xx'yy); e = y - xx*b ; s2 = (e'e)/(tt-kk); v = s2*invpd(xx'xx); econ = b~sqrt(diag(v))~(b./sqrt(diag(v))); econ = vnx~econ; Basic-9

10 sst = yy'yy - tt*meanc(yy)^2; sse = e'e; r2 = 1 - Printing out OLS output file = ols.out reset; let mask[1,4] = ; let fmt[4,3] = "-*.*s" 8 8 "*.*lf" 10 4 "*.*lf" 10 4 "*.*lf" 10 4; format /rd 10,4 ; "" ; "OLS Regression Result" ; " " ; " dependent variable: " $vny ; "" ; " R-Squares " r2 ; "" ; "variable coeff. std. err. t-st " ; yyprin = printfm(econ,mask,fmt); "" ; output off ; Output file: ols.out OLS Regression Result dependent variable: y R-Squares variable coeff. std. err. t-st cons x x x x [4] OLS MONTE CARLO EXPERIMENTS Basic-10

11 Theory says that OLS estimators are normally distributed under ideal conditions. What does it mean? Consider the data exer.txt. The data is generated by the following equation: y t = 0 + x t2 + 2x t3 + 3x t4 + 4x t5 + ε t, t = 1, , and var(ε t ) = 4. Observe that β 2 = 1. We now generate a new data set (say, Data Set 1) as follows: 1. For each t = 1,..., 100, keep the values of x t2,..., x t5, but draw ε t from N(0,4). Then, generate new y t following the above equation. 2. Estimate β2. Name this estimate [1] β2. 3. Generate other data set (say, Data Set 2) by the same way you generate Data Set 1. Then, get β. [2] 2 [1] 4. Repeat 5000 (or more) times and get [5000] β2,..., β2. The econometric theory implies that the estimates will be normally distributed. Let s check whether it is true or not. Program file: olsmonte.prg /* ** Monte Carlo Program Load load data[100,5] = exer.txt Data generation under Classical Linear Regression seed = 1; tt = # of kk = # of iter = # of sets of different xx = Regressors are tb = {0,1,2,3,4} y = x(2)*1 + x(3)*2 + x(4)*3 + x(5)*4 + storb = zeros(iter,1); storse = zeros(iter,1); i = 1; do while i <= Generating Basic-11

12 yy = xx*tb + OLS using yy and b = invpd(xx'xx)*(xx'yy); e = yy - xx*b ; s2 = (e'e)/(tt-kk); v = s2*invpd(xx'xx); se = sqrt(diag(v)); storb[i,1] = b[2,1]; storse[i,1] = se[2,1]; i = i + 1; Reporting Monte Carlo output file = olsmonte.out reset; format /rd 12,3; "Monte Carlo results"; " "; "Mean of OLS b(2) =" meanc(storb); "s.e. of OLS b(2) =" stdc(storb); "mean of estimated s.e. of OLS b(2) =" meanc(storse) ; library pgraph; graphset; {a1,a2,a3}=hist(storb,50); output off ; Output file: olsmonte.out Monte Carlo results Mean of OLS b(2) = s.e. of OLS b(2) = mean of estimated s.e. of OLS b(2) = Basic-12

13 Graphic Outcome: Basic-13

14 [5] OLS Under Heteroskedasticity Program file: hetmonte.prg /* ** Monte Carlo Program for OLS, OLS with White Correction ** and GLS under Heteroskedasticity Data generating seed = seed tt = # of kk = # of iter = # of sets of different x = Nonstochastic tb = y = x(1)*1 + x(2)*2 + rho = 0.1 degree of storob = zeros(iter,1); storose = zeros(iter,1); storosec = zeros(iter,1); storot = zeros(iter,1); storotc = zeros(iter,1); storgb = zeros(iter,1); storgse = zeros(iter,1); storgt = zeros(iter,1); storfb = zeros(iter,1); storfse = zeros(iter,1); storft = zeros(iter,1); i = 1; do while i <= Generating y with y = x*tb + OLS using y and b = invpd(x'x)*(x'y); e = y - x*b ; ee = e^2; s2 = (e'e)/(tt-kk); v = s2*invpd(x'x); vc = (x.*e)'(x.*e); vc = invpd(x'x)*vc*invpd(x'x); Basic-14

15 se = sqrt(diag(v)) ; sec = sqrt(diag(vc)) ; storob[i,1] = b[2,1]; storose[i,1] = se[2,1]; storosec[i,1] = sec[2,1]; olst = (b[2,1]-tb[2,1])/se[2,1]; df = tt-2; pval = 2*cdftc(abs(olst),df); if pval >= 0.05; storot[i,1]= 0; else; storot[i,1] = 1; endif; olstc = (b[2,1]-tb[2,1])/sec[2,1]; df = tt-2; pval = 2*cdftc(abs(olstc),df); if pval >= 0.05; storotc[i,1]= 0; else; storotc[i,1] = 1; infeasible GLS using y and ys = y./sqrt(rho*x[.,2]+(1-rho)*1); xs = x./sqrt(rho*x[.,2]+(1-rho)*1); b = invpd(xs'xs)*(xs'ys); e = ys - xs*b ; s2 = (e'e)/(tt-kk); v = s2*invpd(xs'xs); se = sqrt(diag(v)) ; storgb[i,1] = b[2,1]; storgse[i,1] = se[2,1]; glst = (b[2,1]-tb[2,1])/se[2,1]; df = tt-2; pval = 2*cdftc(abs(glst),df); if pval >= 0.05; storgt[i,1]= 0; else; storgt[i,1] = 1; feasible GLS using y and fh = x*invpd(x'x)*(x'ee); ys = y./sqrt(abs(fh)); xs = x./sqrt(abs(fh)); b = invpd(xs'xs)*(xs'ys); e = ys - xs*b ; Basic-15

16 s2 = (e'e)/(tt-kk); v = s2*invpd(xs'xs); se = sqrt(diag(v)) ; storfb[i,1] = b[2,1]; storfse[i,1] = se[2,1]; glst = (b[2,1]-tb[2,1])/se[2,1]; df = tt-2; pval = 2*cdftc(abs(glst),df); if pval >= 0.05; storft[i,1]= 0; else; storft[i,1] = 1; endif; i = i + 1; Reporting Monte Carlo output file = hetmonte.out reset; format /rd 12,3; "Monte Carlo results"; "" ; " "; "Checking Unbiasedness"; "-----"; "Mean of OLS b(2) =" meanc(storob); "s.e. of OLS b(2) =" stdc(storob); "mean of estimated s.e. of OLS b(2) =" meanc(storose) ; "mean fo White-corrected s.e. of OLS b(2) =" meanc(storosec) ; "-----"; "Mean of infeasible GLS b(2) =" meanc(storgb); "s.e. of infeasible GLS b(2) =" stdc(storgb); "mean of estimated s.e. of infeasible GLS b(2) =" meanc(storgse) ; "-----"; "Mean of feasible GLS b(2) =" meanc(storfb); "s.e. of feasible GLS b(2) =" stdc(storfb); "mean of estimated s.e. of feasible GLS b(2) =" meanc(storfse) ; ""; "Checking sizes of t-tests at 5% sig. level"; "-----"; "Rejection Rate of the t-test with usual OLS =" meanc(storot); "Rejection Rate of the t-test with White-corrected OLS =" meanc(storotc); "Rejection Rate of the t-test with infeasible GLS =" meanc(storgt); "Rejection Rate of the t-test with feasible GLS =" meanc(storft); Basic-16

17 output off ; Output file: hetmonte.out Monte Carlo results Checking Unbiasedness Mean of OLS b(2) = s.e. of OLS b(2) = mean of estimated s.e. of OLS b(2) = mean fo White-corrected s.e. of OLS b(2) = Mean of infeasible GLS b(2) = s.e. of infeasible GLS b(2) = mean of estimated s.e. of infeasible GLS b(2) = Mean of feasible GLS b(2) = s.e. of feasible GLS b(2) = mean of estimated s.e. of feasible GLS b(2) = Checking sizes of t-tests at 5% sig. level Rejection Rate of the t-test with usual OLS = Rejection Rate of the t-test with White-corrected OLS = Rejection Rate of the t-test with infeasible GLS = Rejection Rate of the t-test with feasible GLS = Basic-17

18 [5] OLS Under Autocorrelation Program file: automonte.prg /* ** Monte Carlo Program ** for OLS and GLS ** under Autocorrelation: AR(1) */ seed = 1; tt = # of kk = # of iter = # of sets of different x = Nonstochastic tb = {1,2} y = x(1)*1 + x(2)*2 + rho =.9 e(t) = rho*e(t-1) + vvar = 4; bandw = 5; storb = zeros(iter,1); storse = zeros(iter,1); storsec = zeros(iter,1); stort = zeros(iter,1); stortc = zeros(iter,1); storpwgb = zeros(iter,1); storpwgse = zeros(iter,1); storpwgsec = zeros(iter,1); storpwgt = zeros(iter,1); storcogb = zeros(iter,1); storcogse = zeros(iter,1); storcogsec = zeros(iter,1); storcogt = zeros(iter,1); i = 1; do while i <= Generating y with ep= sqrt(vvar/(1-rho^2))*rndns(tt,1,seed); j = 2; do while j <= tt; ep[j,1] = rho*ep[j-1,1]+ep[j,1] ; j = j + 1 ; endo ; y = x*tb + 2*ep ; Basic-18

19 @ OLS using y and b = invpd(x'x)*(x'y); e = y - x*b ; s2 = (e'e)/(tt-kk); v = s2*invpd(x'x); proc nw(uv,l) ; local j,omeo,n,w,ome ; n = rows(uv) ; omeo = uv'uv/n ; j = 1; do while j <= l ; w = 1 - j/(l+1) ; ome = uv[j+1:n,.]'uv[1:n-j,.]/n ; omeo = omeo + w*(ome+ome') ; j = j + 1 ; endo ; retp(omeo) ; endp ; vc = invpd(x'x)*(tt*nw(x.*e,bandw))*invpd(x'x); se = sqrt(diag(v)) ; sec = sqrt(diag(vc)) ; storb[i,1] = b[2,1]; storse[i,1] = se[2,1]; storsec[i,1] = sec[2,1]; olst = (b[2,1]-tb[2,1])/se[2,1]; df = tt-2; pval = 2*cdftc(abs(olst),df); if pval >= 0.05; stort[i,1]= 0; else; stort[i,1] = 1; endif; olst = (b[2,1]-tb[2,1])/sec[2,1]; df = tt-2; pval = 2*cdftc(abs(olst),df); if pval >= 0.05; stortc[i,1]= 0; else; stortc[i,1] = 1; GLS using y and Basic-19

20 gxx = y[1:rows(y)-1,1]~x[2:rows(x),.]~x[1:rows(x)-1,2]; gyy = y[2:rows(y),1]; durb = invpd(gxx'gxx)*(gxx'gyy); drho = durb[1,1]; gyy = (sqrt(1-drho^2)*y[1,.]) (y[2:rows(y),.]-drho*y[1:rows(y)-1,.]); gxx = (sqrt(1-drho^2)*x[1,.]) (x[2:rows(y),.]-drho*x[1:rows(y)-1,.]); pwglsb = invpd(gxx'gxx)*(gxx'gyy); pwe = gyy - gxx*pwglsb; pws2 = (pwe'pwe)/(tt-kk); pwv = pws2*invpd(gxx'gxx); pwse = sqrt(diag(pwv)) ; storpwgb[i,1] = pwglsb[2,1]; storpwgse[i,1] = pwse[2,1]; glst = (pwglsb[2,1]-tb[2,1])/pwse[2,1]; df = tt-2; pval = 2*cdftc(abs(glst),df); if pval >= 0.05; storpwgt[i,1]= 0; else; storpwgt[i,1] = 1; endif; gyy = gyy[2:rows(gyy),.]; gxx = gxx[2:rows(gxx),.]; coglsb = invpd(gxx'gxx)*(gxx'gyy); coe = gyy - gxx*coglsb; cos2 = (coe'coe)/(tt-kk-1); cov = cos2*invpd(gxx'gxx); cose = sqrt(diag(cov)) ; storcogb[i,1] = coglsb[2,1]; storcogse[i,1] = cose[2,1]; glst = (coglsb[2,1]-tb[2,1])/cose[2,1]; df = tt-2-1; pval = 2*cdftc(abs(glst),df); if pval >= 0.05; storcogt[i,1]= 0; else; storcogt[i,1] = 1; endif; i = i + 1; endo; Basic-20

21 @ Reporting Monte Carlo output file = automonte.out reset; format /rd 12,3; "Monte Carlo results"; "" ; " "; "Checking Unibiasedness"; "-----"; "Mean of OLS b(2) =" meanc(storb); "s.e. of OLS b(2) =" stdc(storb); "mean of estimated s.e. of OLS b(2) =" meanc(storse) ; "mean fo NW-corrected s.e. of OLS b(2) =" meanc(storsec) ; " "; "Mean of P-W feasible GLS b(2) =" meanc(storpwgb); "s.e. of P-W feasible GLS b(2) =" stdc(storpwgb); "mean of P-W estimated s.e. of feasible GLS b(2) =" meanc(storpwgse) ; " "; "Mean of C-O feasible GLS b(2) =" meanc(storcogb); "s.e. of C-O feasible GLS b(2) =" stdc(storcogb); "mean of C-O estimated s.e. of feasible GLS b(2) =" meanc(storcogse) ; ""; "Checking sizes of t-tests at 5% of sig. level"; " "; "Rejection Rate of the t-test with usual OLS =" meanc(stort); "Rejection Rate of the t-test with NW-corrected OLS =" meanc(stortc); "Rejection Rate of the t-test with PW feasible GLS =" meanc(storpwgt); "Rejection Rate of the t-test with Co feasible GLS =" meanc(storcogt); output off ; Basic-21

22 Output file: automonte.out Monte Carlo results Checking Unibiasedness Mean of OLS b(2) = s.e. of OLS b(2) = mean of estimated s.e. of OLS b(2) = mean fo NW-corrected s.e. of OLS b(2) = Mean of P-W feasible GLS b(2) = s.e. of P-W feasible GLS b(2) = mean of P-W estimated s.e. of feasible GLS b(2) = Mean of C-O feasible GLS b(2) = s.e. of C-O feasible GLS b(2) = mean of C-O estimated s.e. of feasible GLS b(2) = Checking sizes of t-tests at 5% of sig. level Rejection Rate of the t-test with usual OLS = Rejection Rate of the t-test with NW-corrected OLS = Rejection Rate of the t-test with PW feasible GLS = Rejection Rate of the t-test with Co feasible GLS = Basic-22

TUTORIAL: MLE. load dat[1962,25] = mwpsid82.db Data on married women from

TUTORIAL: MLE. load dat[1962,25] = mwpsid82.db Data on married women from TUTORIAL: MLE PROBIT. PRG: /* ** Probit MLE Estimation */ new ; @ LOADING DATA @ load dat[1962,25] = mwpsid82.db ; @ Data on married women from PSID @ @ OPEN OUTPUT FILE @ output file = probit.out reset

More information

Gauss for Econometrics: Simulation

Gauss for Econometrics: Simulation Gauss for Econometrics: Simulation R.G. Pierse 1. Introduction Simulation is a very useful tool in econometric modelling. It allows the economist to examine the properties of models and estimators when

More information

TUTORIAL: GMM GMM-1. /* ** GMM FOR SINGLE EQUATION ** Using Newey-West and Andrews Covariance Matrix */ new LOADING

TUTORIAL: GMM GMM-1. /* ** GMM FOR SINGLE EQUATION ** Using Newey-West and Andrews Covariance Matrix */ new LOADING TUTORIAL: GMM Program: gmm_1.prg /* ** GMM FOR SINGLE EQUATION ** Using Newey-West and Andrews Covariance Matrix */ new ; LOADING DATA load dat[923,17] = mwemp.db ; Data on employed married women OPEN

More information

GAUSS T U T O R I A L

GAUSS T U T O R I A L Social Science Research Lab American University Washington, D.C. http://www.american.edu/ssrl 202.885.3862 GAUSS T U T O R I A L GAUSS is a powerful matrix-oriented computer programming environment. It

More information

Introduction to MATLAB

Introduction to MATLAB Introduction to MATLAB Econ 8305 Fall 2015 Hang Zhou The George Washington University Overview 1 Before Getting Started 2 Vector and Matrix Basic Scalar Calculation Matrix Arithmetic Operation Some Useful

More information

Two-Stage Least Squares

Two-Stage Least Squares Chapter 316 Two-Stage Least Squares Introduction This procedure calculates the two-stage least squares (2SLS) estimate. This method is used fit models that include instrumental variables. 2SLS includes

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

Computer Problem Sheet 1: Introduction to Matlab

Computer Problem Sheet 1: Introduction to Matlab Computer Problem Sheet 1: Introduction to Matlab Most Bayesians econometricians create their own programs using programs such as Matlab or Gauss. When writing my textbook I used Matlab and the website

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

Appendix B BASIC MATRIX OPERATIONS IN PROC IML B.1 ASSIGNING SCALARS

Appendix B BASIC MATRIX OPERATIONS IN PROC IML B.1 ASSIGNING SCALARS Appendix B BASIC MATRIX OPERATIONS IN PROC IML B.1 ASSIGNING SCALARS Scalars can be viewed as 1 1 matrices and can be created using Proc IML by using the statement x¼scalar_value or x¼{scalar_value}. As

More information

0_PreCNotes17 18.notebook May 16, Chapter 12

0_PreCNotes17 18.notebook May 16, Chapter 12 Chapter 12 Notes BASIC MATRIX OPERATIONS Matrix (plural: Matrices) an n x m array of elements element a ij Example 1 a 21 = a 13 = Multiply Matrix by a Scalar Distribute scalar to all elements Addition

More information

MAT 275 Laboratory 2 Matrix Computations and Programming in MATLAB

MAT 275 Laboratory 2 Matrix Computations and Programming in MATLAB MATLAB sessions: Laboratory MAT 75 Laboratory Matrix Computations and Programming in MATLAB In this laboratory session we will learn how to. Create and manipulate matrices and vectors.. Write simple programs

More information

Introduction to Matlab

Introduction to Matlab Introduction to Matlab By:Mohammad Sadeghi *Dr. Sajid Gul Khawaja Slides has been used partially to prepare this presentation Outline: What is Matlab? Matlab Screen Basic functions Variables, matrix, indexing

More information

Vector: A series of scalars contained in a column or row. Dimensions: How many rows and columns a vector or matrix has.

Vector: A series of scalars contained in a column or row. Dimensions: How many rows and columns a vector or matrix has. ASSIGNMENT 0 Introduction to Linear Algebra (Basics of vectors and matrices) Due 3:30 PM, Tuesday, October 10 th. Assignments should be submitted via e-mail to: matlabfun.ucsd@gmail.com You can also submit

More information

A Short Introduction to Matlab

A Short Introduction to Matlab A Short Introduction to Matlab Duke University Overview basic matrix operations built in functions user defined functions I/O graphics looping Overview basic matrix operations built in functions user defined

More information

OLS Assumptions and Goodness of Fit

OLS Assumptions and Goodness of Fit OLS Assumptions and Goodness of Fit A little warm-up Assume I am a poor free-throw shooter. To win a contest I can choose to attempt one of the two following challenges: A. Make three out of four free

More information

INSTRUCTOR: KLAUS MOELTNER

INSTRUCTOR: KLAUS MOELTNER SCRIPT MOD1S3: SMALL-SAMPLE PROPERTIES OF OLS ESTIMATOR INSTRUCTOR: KLAUS MOELTNER Set basic R-options upfront and load all required R packages: Set parameters for sampling. 1. Data Generation R> N

More information

MAT 275 Laboratory 2 Matrix Computations and Programming in MATLAB

MAT 275 Laboratory 2 Matrix Computations and Programming in MATLAB MATLAB sessions: Laboratory MAT 75 Laboratory Matrix Computations and Programming in MATLAB In this laboratory session we will learn how to. Create and manipulate matrices and vectors.. Write simple programs

More information

MAT 275 Laboratory 2 Matrix Computations and Programming in MATLAB

MAT 275 Laboratory 2 Matrix Computations and Programming in MATLAB MAT 75 Laboratory Matrix Computations and Programming in MATLAB In this laboratory session we will learn how to. Create and manipulate matrices and vectors.. Write simple programs in MATLAB NOTE: For your

More information

FreeMat Tutorial. 3x + 4y 2z = 5 2x 5y + z = 8 x x + 3y = -1 xx

FreeMat Tutorial. 3x + 4y 2z = 5 2x 5y + z = 8 x x + 3y = -1 xx 1 of 9 FreeMat Tutorial FreeMat is a general purpose matrix calculator. It allows you to enter matrices and then perform operations on them in the same way you would write the operations on paper. This

More information

Compare Linear Regression Lines for the HP-67

Compare Linear Regression Lines for the HP-67 Compare Linear Regression Lines for the HP-67 by Namir Shammas This article presents an HP-67 program that calculates the linear regression statistics for two data sets and then compares their slopes and

More information

Econometrics I: OLS. Dean Fantazzini. Dipartimento di Economia Politica e Metodi Quantitativi. University of Pavia

Econometrics I: OLS. Dean Fantazzini. Dipartimento di Economia Politica e Metodi Quantitativi. University of Pavia Dipartimento di Economia Politica e Metodi Quantitativi University of Pavia Overview of the Lecture 1 st EViews Session I: Convergence in the Solow Model 2 Overview of the Lecture 1 st EViews Session I:

More information

Statistical Programming in SAS. From Chapter 10 - Programming with matrices and vectors - IML

Statistical Programming in SAS. From Chapter 10 - Programming with matrices and vectors - IML Week 12 [30+ Nov.] Class Activities File: week-12-iml-prog-16nov08.doc Directory: \\Muserver2\USERS\B\\baileraj\Classes\sta402\handouts From Chapter 10 - Programming with matrices and vectors - IML 10.1:

More information

MATLAB: Quick Start Econ 837

MATLAB: Quick Start Econ 837 MATLAB: Quick Start Econ 837 Introduction MATLAB is a commercial Matrix Laboratory package which operates as an interactive programming environment. It is a programming language and a computing environment

More information

Conditional and Unconditional Regression with No Measurement Error

Conditional and Unconditional Regression with No Measurement Error Conditional and with No Measurement Error /* reg2ways.sas */ %include 'readsenic.sas'; title2 ''; proc reg; title3 'Conditional Regression'; model infrisk = stay census; proc calis cov; /* Analyze the

More information

Computer Packet 1 Row Operations + Freemat

Computer Packet 1 Row Operations + Freemat Computer Packet 1 Row Operations + Freemat For this packet, you will use a website to do row operations, and then learn to use a general purpose matrix calculator called FreeMat. To reach the row operations

More information

Matrix Inverse 2 ( 2) 1 = 2 1 2

Matrix Inverse 2 ( 2) 1 = 2 1 2 Name: Matrix Inverse For Scalars, we have what is called a multiplicative identity. This means that if we have a scalar number, call it r, then r multiplied by the multiplicative identity equals r. Without

More information

Matrices. A Matrix (This one has 2 Rows and 3 Columns) To add two matrices: add the numbers in the matching positions:

Matrices. A Matrix (This one has 2 Rows and 3 Columns) To add two matrices: add the numbers in the matching positions: Matrices A Matrix is an array of numbers: We talk about one matrix, or several matrices. There are many things we can do with them... Adding A Matrix (This one has 2 Rows and 3 Columns) To add two matrices:

More information

Matlab and Octave: Quick Introduction and Examples 1 Basics

Matlab and Octave: Quick Introduction and Examples 1 Basics Matlab and Octave: Quick Introduction and Examples 1 Basics 1.1 Syntax and m-files There is a shell where commands can be written in. All commands must either be built-in commands, functions, names of

More information

OVERVIEW OF ESTIMATION FRAMEWORKS AND ESTIMATORS

OVERVIEW OF ESTIMATION FRAMEWORKS AND ESTIMATORS OVERVIEW OF ESTIMATION FRAMEWORKS AND ESTIMATORS Set basic R-options upfront and load all required R packages: > options(prompt = " ", digits = 4) setwd('c:/klaus/aaec5126/test/')#r Sweaves to the default

More information

Lecture 5: Matrices. Dheeraj Kumar Singh 07CS1004 Teacher: Prof. Niloy Ganguly Department of Computer Science and Engineering IIT Kharagpur

Lecture 5: Matrices. Dheeraj Kumar Singh 07CS1004 Teacher: Prof. Niloy Ganguly Department of Computer Science and Engineering IIT Kharagpur Lecture 5: Matrices Dheeraj Kumar Singh 07CS1004 Teacher: Prof. Niloy Ganguly Department of Computer Science and Engineering IIT Kharagpur 29 th July, 2008 Types of Matrices Matrix Addition and Multiplication

More information

DOCUMENTATION FOR THE ESTIMATION 3D RANDOM EFFECTS PANEL DATA ESTIMATION PROGRAMS

DOCUMENTATION FOR THE ESTIMATION 3D RANDOM EFFECTS PANEL DATA ESTIMATION PROGRAMS DOCUMENTATION FOR THE ESTIMATION 3D RANDOM EFFECTS PANEL DATA ESTIMATION PROGRAMS All algorithms stored in separate do files. Usage is to first run the full.do file in Stata, then run the desired estimations

More information

OUTLINES. Variable names in MATLAB. Matrices, Vectors and Scalar. Entering a vector Colon operator ( : ) Mathematical operations on vectors.

OUTLINES. Variable names in MATLAB. Matrices, Vectors and Scalar. Entering a vector Colon operator ( : ) Mathematical operations on vectors. 1 LECTURE 3 OUTLINES Variable names in MATLAB Examples Matrices, Vectors and Scalar Scalar Vectors Entering a vector Colon operator ( : ) Mathematical operations on vectors examples 2 VARIABLE NAMES IN

More information

Lecture 2. Arrays. 1 Introduction

Lecture 2. Arrays. 1 Introduction 1 Introduction Lecture 2 Arrays As the name Matlab is a contraction of matrix laboratory, you would be correct in assuming that Scilab/Matlab have a particular emphasis on matrices, or more generally,

More information

MATLAB: The Basics. Dmitry Adamskiy 9 November 2011

MATLAB: The Basics. Dmitry Adamskiy 9 November 2011 MATLAB: The Basics Dmitry Adamskiy adamskiy@cs.rhul.ac.uk 9 November 2011 1 Starting Up MATLAB Windows users: Start up MATLAB by double clicking on the MATLAB icon. Unix/Linux users: Start up by typing

More information

Introduction: EViews. Dr. Peerapat Wongchaiwat

Introduction: EViews. Dr. Peerapat Wongchaiwat Introduction: EViews Dr. Peerapat Wongchaiwat wongchaiwat@hotmail.com Today s Workshop Basic grasp of how EViews manages data Creating Workfiles Importing data Running regressions Performing basic tests

More information

MATLAB for beginners. KiJung Yoon, 1. 1 Center for Learning and Memory, University of Texas at Austin, Austin, TX 78712, USA

MATLAB for beginners. KiJung Yoon, 1. 1 Center for Learning and Memory, University of Texas at Austin, Austin, TX 78712, USA MATLAB for beginners KiJung Yoon, 1 1 Center for Learning and Memory, University of Texas at Austin, Austin, TX 78712, USA 1 MATLAB Tutorial I What is a matrix? 1) A way of representation for data (# of

More information

Introduction and MATLAB Basics

Introduction and MATLAB Basics Introduction and MATLAB Basics Lecture Computer Room MATLAB MATLAB: Matrix Laboratory, designed for matrix manipulation Pro: Con: Syntax similar to C/C++/Java Automated memory management Dynamic data types

More information

ECON 502 INTRODUCTION TO MATLAB Nov 9, 2007 TA: Murat Koyuncu

ECON 502 INTRODUCTION TO MATLAB Nov 9, 2007 TA: Murat Koyuncu ECON 502 INTRODUCTION TO MATLAB Nov 9, 2007 TA: Murat Koyuncu 0. What is MATLAB? 1 MATLAB stands for matrix laboratory and is one of the most popular software for numerical computation. MATLAB s basic

More information

MATLAB INTRO 1. Suppose that we want to define a 3 1 vector x, with elements given as 3,5 and 1. We do this as follows: x = [3; 5; 1]

MATLAB INTRO 1. Suppose that we want to define a 3 1 vector x, with elements given as 3,5 and 1. We do this as follows: x = [3; 5; 1] MATLAB INTRO 1 1 MATLAB Operations Matlab uses the symbols *,/,+,-,and ˆ to denote multiplication, division, addition, subtraction and exponention, respectively. For the case of matrix multiplication,

More information

Compare Linear Regression Lines for the HP-41C

Compare Linear Regression Lines for the HP-41C Compare Linear Regression Lines for the HP-41C by Namir Shammas This article presents an HP-41C program that calculates the linear regression statistics for two data sets and then compares their slopes

More information

Introduction to the Monte Carlo Method Ryan Godwin ECON 7010

Introduction to the Monte Carlo Method Ryan Godwin ECON 7010 1 Introduction to the Monte Carlo Method Ryan Godwin ECON 7010 The Monte Carlo method provides a laboratory in which the properties of estimators and tests can be explored. Although the Monte Carlo method

More information

Non-convex Multi-objective Optimization

Non-convex Multi-objective Optimization Non-convex Multi-objective Optimization Multi-objective Optimization Real-world optimization problems usually involve more than one criteria multi-objective optimization. Such a kind of optimization problems

More information

Introduction to Matlab for Econ 511b

Introduction to Matlab for Econ 511b Introduction to Matlab for Econ 511b I. Introduction Jinhui Bai January 20, 2004 Matlab means Matrix Laboratory. From the name you can see that it is a matrix programming language. Matlab includes both

More information

GOV 2001/ 1002/ E-2001 Section 1 1 Monte Carlo Simulation

GOV 2001/ 1002/ E-2001 Section 1 1 Monte Carlo Simulation GOV 2001/ 1002/ E-2001 Section 1 1 Monte Carlo Simulation Anton Strezhnev Harvard University January 27, 2016 1 These notes and accompanying code draw on the notes from TF s from previous years. 1 / 33

More information

TUTORIAL 1 Introduction to Matrix Calculation using MATLAB TUTORIAL 1 INTRODUCTION TO MATRIX CALCULATION USING MATLAB

TUTORIAL 1 Introduction to Matrix Calculation using MATLAB TUTORIAL 1 INTRODUCTION TO MATRIX CALCULATION USING MATLAB INTRODUCTION TO MATRIX CALCULATION USING MATLAB Learning objectives Getting started with MATLAB and it s user interface Learn some of MATLAB s commands and syntaxes Get a simple introduction to use of

More information

Introduction to Matlab

Introduction to Matlab Introduction to Matlab Andreas C. Kapourani (Credit: Steve Renals & Iain Murray) 9 January 08 Introduction MATLAB is a programming language that grew out of the need to process matrices. It is used extensively

More information

A Brief Introduction to Matlab for Econometrics Simulations. Greg Fischer MIT February 2006

A Brief Introduction to Matlab for Econometrics Simulations. Greg Fischer MIT February 2006 A Brief Introduction to Matlab for Econometrics Simulations Greg Fischer MIT February 2006 Introduction First, Don t Panic! As the problem set assured you, the point of the programming exercises is to

More information

2 Geometry Solutions

2 Geometry Solutions 2 Geometry Solutions jacques@ucsd.edu Here is give problems and solutions in increasing order of difficulty. 2.1 Easier problems Problem 1. What is the minimum number of hyperplanar slices to make a d-dimensional

More information

Introduction to MATLAB

Introduction to MATLAB Introduction to MATLAB Introduction MATLAB is an interactive package for numerical analysis, matrix computation, control system design, and linear system analysis and design available on most CAEN platforms

More information

Therefore, after becoming familiar with the Matrix Method, you will be able to solve a system of two linear equations in four different ways.

Therefore, after becoming familiar with the Matrix Method, you will be able to solve a system of two linear equations in four different ways. Grade 9 IGCSE A1: Chapter 9 Matrices and Transformations Materials Needed: Straightedge, Graph Paper Exercise 1: Matrix Operations Matrices are used in Linear Algebra to solve systems of linear equations.

More information

x = 12 x = 12 1x = 16

x = 12 x = 12 1x = 16 2.2 - The Inverse of a Matrix We've seen how to add matrices, multiply them by scalars, subtract them, and multiply one matrix by another. The question naturally arises: Can we divide one matrix by another?

More information

Teaching Manual Math 2131

Teaching Manual Math 2131 Math 2131 Linear Algebra Labs with MATLAB Math 2131 Linear algebra with Matlab Teaching Manual Math 2131 Contents Week 1 3 1 MATLAB Course Introduction 5 1.1 The MATLAB user interface...........................

More information

Computing with vectors and matrices in C++

Computing with vectors and matrices in C++ CS319: Scientific Computing (with C++) Computing with vectors and matrices in C++ Week 7: 9am and 4pm, 22 Feb 2017 1 Introduction 2 Solving linear systems 3 Jacobi s Method 4 Implementation 5 Vectors 6

More information

UNDERSTANDING PROBLEMS AND HOW TO SOLVE THEM BY USING COMPUTERS

UNDERSTANDING PROBLEMS AND HOW TO SOLVE THEM BY USING COMPUTERS UNDERSTANDING PROBLEMS AND HOW TO SOLVE THEM BY USING COMPUTERS INTRODUCTION TO PROBLEM SOLVING Introduction to Problem Solving Understanding problems Data processing Writing an algorithm CONTINUE.. Tool

More information

Introduction to Matlab. By: Hossein Hamooni Fall 2014

Introduction to Matlab. By: Hossein Hamooni Fall 2014 Introduction to Matlab By: Hossein Hamooni Fall 2014 Why Matlab? Data analytics task Large data processing Multi-platform, Multi Format data importing Graphing Modeling Lots of built-in functions for rapid

More information

MATLAB Modul 3. Introduction

MATLAB Modul 3. Introduction MATLAB Modul 3 Introduction to Computational Science: Modeling and Simulation for the Sciences, 2 nd Edition Angela B. Shiflet and George W. Shiflet Wofford College 2014 by Princeton University Press Introduction

More information

ECE Lesson Plan - Class 1 Fall, 2001

ECE Lesson Plan - Class 1 Fall, 2001 ECE 201 - Lesson Plan - Class 1 Fall, 2001 Software Development Philosophy Matrix-based numeric computation - MATrix LABoratory High-level programming language - Programming data type specification not

More information

Week 4: Simple Linear Regression III

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

More information

Introduction to MATLAB

Introduction to MATLAB 58:110 Computer-Aided Engineering Spring 2005 Introduction to MATLAB Department of Mechanical and industrial engineering January 2005 Topics Introduction Running MATLAB and MATLAB Environment Getting help

More information

Lecture 2: Variables, Vectors and Matrices in MATLAB

Lecture 2: Variables, Vectors and Matrices in MATLAB Lecture 2: Variables, Vectors and Matrices in MATLAB Dr. Mohammed Hawa Electrical Engineering Department University of Jordan EE201: Computer Applications. See Textbook Chapter 1 and Chapter 2. Variables

More information

CSc 372 Comparative Programming Languages

CSc 372 Comparative Programming Languages CSc 372 Comparative Programming Languages 8 : Haskell Function Examples Christian Collberg collberg+372@gmail.com Department of Computer Science University of Arizona Copyright c 2005 Christian Collberg

More information

CSc 372. Comparative Programming Languages. 8 : Haskell Function Examples. Department of Computer Science University of Arizona

CSc 372. Comparative Programming Languages. 8 : Haskell Function Examples. Department of Computer Science University of Arizona 1/43 CSc 372 Comparative Programming Languages 8 : Haskell Function Examples Department of Computer Science University of Arizona collberg@gmail.com Copyright c 2013 Christian Collberg Functions over Lists

More information

Example 1 of panel data : Data for 6 airlines (groups) over 15 years (time periods) Example 1

Example 1 of panel data : Data for 6 airlines (groups) over 15 years (time periods) Example 1 Panel data set Consists of n entities or subjects (e.g., firms and states), each of which includes T observations measured at 1 through t time period. total number of observations : nt Panel data have

More information

MATLAB Premier. Middle East Technical University Department of Mechanical Engineering ME 304 1/50

MATLAB Premier. Middle East Technical University Department of Mechanical Engineering ME 304 1/50 MATLAB Premier Middle East Technical University Department of Mechanical Engineering ME 304 1/50 Outline Introduction Basic Features of MATLAB Prompt Level and Basic Arithmetic Operations Scalars, Vectors,

More information

What is MATLAB? What is MATLAB? Programming Environment MATLAB PROGRAMMING. Stands for MATrix LABoratory. A programming environment

What is MATLAB? What is MATLAB? Programming Environment MATLAB PROGRAMMING. Stands for MATrix LABoratory. A programming environment What is MATLAB? MATLAB PROGRAMMING Stands for MATrix LABoratory A software built around vectors and matrices A great tool for numerical computation of mathematical problems, such as Calculus Has powerful

More information

Lecture 2: Introduction to Numerical Simulation

Lecture 2: Introduction to Numerical Simulation Lecture 2: Introduction to Numerical Simulation Ahmed Kebaier kebaier@math.univ-paris13.fr HEC, Paris Outline of The Talk 1 Simulation of Random variables Outline 1 Simulation of Random variables Random

More information

PC-MATLAB PRIMER. This is intended as a guided tour through PCMATLAB. Type as you go and watch what happens.

PC-MATLAB PRIMER. This is intended as a guided tour through PCMATLAB. Type as you go and watch what happens. PC-MATLAB PRIMER This is intended as a guided tour through PCMATLAB. Type as you go and watch what happens. >> 2*3 ans = 6 PCMATLAB uses several lines for the answer, but I ve edited this to save space.

More information

PARALLEL METHODS FOR SOLVING PARTIAL DIFFERENTIAL EQUATIONS. Ioana Chiorean

PARALLEL METHODS FOR SOLVING PARTIAL DIFFERENTIAL EQUATIONS. Ioana Chiorean 5 Kragujevac J. Math. 25 (2003) 5 18. PARALLEL METHODS FOR SOLVING PARTIAL DIFFERENTIAL EQUATIONS Ioana Chiorean Babeş-Bolyai University, Department of Mathematics, Cluj-Napoca, Romania (Received May 28,

More information

Minima, Maxima, Saddle points

Minima, Maxima, Saddle points Minima, Maxima, Saddle points Levent Kandiller Industrial Engineering Department Çankaya University, Turkey Minima, Maxima, Saddle points p./9 Scalar Functions Let us remember the properties for maxima,

More information

Statistical Analysis Using XLispStat, R and Gretl: A Beginning

Statistical Analysis Using XLispStat, R and Gretl: A Beginning Statistical Analysis Using XLispStat, R and Gretl: A Beginning John E. Floyd University of Toronto September 16, 2011 This document presents some details on how to perform OLS-regression analysis and do

More information

Dynamic Programming part 2

Dynamic Programming part 2 Dynamic Programming part 2 Week 7 Objectives More dynamic programming examples - Matrix Multiplication Parenthesis - Longest Common Subsequence Subproblem Optimal structure Defining the dynamic recurrence

More information

INTRODUCTION TO PANEL DATA ANALYSIS

INTRODUCTION TO PANEL DATA ANALYSIS INTRODUCTION TO PANEL DATA ANALYSIS USING EVIEWS FARIDAH NAJUNA MISMAN, PhD FINANCE DEPARTMENT FACULTY OF BUSINESS & MANAGEMENT UiTM JOHOR PANEL DATA WORKSHOP-23&24 MAY 2017 1 OUTLINE 1. Introduction 2.

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

MIXREG for Windows. Overview

MIXREG for Windows. Overview MIXREG for Windows Overview MIXREG is a program that provides estimates for a mixed-effects regression model (MRM) including autocorrelated errors. This model can be used for analysis of unbalanced longitudinal

More information

Lab1: Use of Word and Excel

Lab1: Use of Word and Excel Dr. Fritz Wilhelm; physics 230 Lab1: Use of Word and Excel Page 1 of 9 Lab partners: Download this page onto your computer. Also download the template file which you can use whenever you start your lab

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

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

EXTENSION. a 1 b 1 c 1 d 1. Rows l a 2 b 2 c 2 d 2. a 3 x b 3 y c 3 z d 3. This system can be written in an abbreviated form as

EXTENSION. a 1 b 1 c 1 d 1. Rows l a 2 b 2 c 2 d 2. a 3 x b 3 y c 3 z d 3. This system can be written in an abbreviated form as EXTENSION Using Matrix Row Operations to Solve Systems The elimination method used to solve systems introduced in the previous section can be streamlined into a systematic method by using matrices (singular:

More information

MATLAB Premier. Asst. Prof. Dr. Melik DÖLEN. Middle East Technical University Department of Mechanical Engineering 10/30/04 ME 304 1

MATLAB Premier. Asst. Prof. Dr. Melik DÖLEN. Middle East Technical University Department of Mechanical Engineering 10/30/04 ME 304 1 MATLAB Premier Asst. Prof. Dr. Melik DÖLEN Middle East Technical University Department of Mechanical Engineering 0/0/04 ME 04 Outline! Introduction! Basic Features of MATLAB! Prompt Level and Basic Aritmetic

More information

Computational Modelling 102 (Scientific Programming) Tutorials

Computational Modelling 102 (Scientific Programming) Tutorials COMO 102 : Scientific Programming, Tutorials 2003 1 Computational Modelling 102 (Scientific Programming) Tutorials Dr J. D. Enlow Last modified August 18, 2003. Contents Tutorial 1 : Introduction 3 Tutorial

More information

CSSS 510: Lab 2. Introduction to Maximum Likelihood Estimation

CSSS 510: Lab 2. Introduction to Maximum Likelihood Estimation CSSS 510: Lab 2 Introduction to Maximum Likelihood Estimation 2018-10-12 0. Agenda 1. Housekeeping: simcf, tile 2. Questions about Homework 1 or lecture 3. Simulating heteroskedastic normal data 4. Fitting

More information

1:39:01 PM]

1:39:01 PM] /****************** ADEDIS3.PRG****************************/ /****** GAUSS PROGRAM TO CARRY OUT DIRECT SEMI- ***********/ /*** PARAMETRIC ESTIMATION OF A SINGLE-INDEX MODEL WITH ***/ /***ONE OR MORE DISCRETE

More information

DataSet2. <none> <none> <none>

DataSet2. <none> <none> <none> GGraph Notes Output Created 09-Dec-0 07:50:6 Comments Input Active Dataset Filter Weight Split File DataSet Syntax Resources N of Rows in Working Data File Processor Time Elapsed Time 77 GGRAPH /GRAPHDATASET

More information

Basic Matrix Manipulation with a TI-89/TI-92/Voyage 200

Basic Matrix Manipulation with a TI-89/TI-92/Voyage 200 Basic Matrix Manipulation with a TI-89/TI-92/Voyage 200 Often, a matrix may be too large or too complex to manipulate by hand. For these types of matrices, we can employ the help of graphing calculators

More information

Video of BALSA Scanline Poly Fill Algorithm Animator CS 460. Computer Graphics. Scanline Polygon Fill Algorithm

Video of BALSA Scanline Poly Fill Algorithm Animator CS 460. Computer Graphics. Scanline Polygon Fill Algorithm CS 460 Computer Graphics Professor Richard Eckert February 25/27, 2004 1. Area Fill Boundary/Flood Fill Scanline Polygon Fill Scanline Boundary Fill Pattern Fill 2. Transformations Scanline Polygon Fill

More information

MBI REU Matlab Tutorial

MBI REU Matlab Tutorial MBI REU Matlab Tutorial Lecturer: Reginald L. McGee II, Ph.D. June 8, 2017 MATLAB MATrix LABoratory MATLAB is a tool for numerical computation and visualization which allows Real & Complex Arithmetics

More information

maximize c, x subject to Ax b,

maximize c, x subject to Ax b, Lecture 8 Linear programming is about problems of the form maximize c, x subject to Ax b, where A R m n, x R n, c R n, and b R m, and the inequality sign means inequality in each row. The feasible set

More information

Applied Statistics and Econometrics Lecture 6

Applied Statistics and Econometrics Lecture 6 Applied Statistics and Econometrics Lecture 6 Giuseppe Ragusa Luiss University gragusa@luiss.it http://gragusa.org/ March 6, 2017 Luiss University Empirical application. Data Italian Labour Force Survey,

More information

6.24 Estimate the average time (in ms) to access a sector on the following disk:

6.24 Estimate the average time (in ms) to access a sector on the following disk: Homework Problems 631 There is a large body of literature on building and using disk storage Many storage researchers look for ways to aggregate individual disks into larger, more robust, and more secure

More information

MATLAB GUIDE UMD PHYS375 FALL 2010

MATLAB GUIDE UMD PHYS375 FALL 2010 MATLAB GUIDE UMD PHYS375 FALL 200 DIRECTORIES Find the current directory you are in: >> pwd C:\Documents and Settings\ian\My Documents\MATLAB [Note that Matlab assigned this string of characters to a variable

More information

SF1901 Probability Theory and Statistics: Autumn 2016 Lab 0 for TCOMK

SF1901 Probability Theory and Statistics: Autumn 2016 Lab 0 for TCOMK Mathematical Statistics SF1901 Probability Theory and Statistics: Autumn 2016 Lab 0 for TCOMK 1 Preparation This computer exercise is a bit different from the other two, and has some overlap with computer

More information

AH Matrices.notebook November 28, 2016

AH Matrices.notebook November 28, 2016 Matrices Numbers are put into arrays to help with multiplication, division etc. A Matrix (matrices pl.) is a rectangular array of numbers arranged in rows and columns. Matrices If there are m rows and

More information

How to Use MATLAB. What is MATLAB. Getting Started. Online Help. General Purpose Commands

How to Use MATLAB. What is MATLAB. Getting Started. Online Help. General Purpose Commands How to Use MATLAB What is MATLAB MATLAB is an interactive package for numerical analysis, matrix computation, control system design and linear system analysis and design. On the server bass, MATLAB version

More information

6.001 SICP. Types. Types compound data. Types simple data. Types. Types procedures

6.001 SICP. Types. Types compound data. Types simple data. Types. Types procedures Today s topics Types of objects and procedures Procedural abstractions Capturing patterns across procedures Higher Order Procedures Types (+ 5 1) ==> 15 (+ "hi 5) ;The object "hi", passed as the first

More information

Part 1. The Review of Linear Programming The Revised Simplex Method

Part 1. The Review of Linear Programming The Revised Simplex Method In the name of God Part 1. The Review of Linear Programming 1.4. Spring 2010 Instructor: Dr. Masoud Yaghini Introduction Outline in Tableau Format Comparison Between the Simplex and the Revised Simplex

More information

University of Alberta

University of Alberta A Brief Introduction to MATLAB University of Alberta M.G. Lipsett 2008 MATLAB is an interactive program for numerical computation and data visualization, used extensively by engineers for analysis of systems.

More information

MAT 343 Laboratory 1 Matrix and Vector Computations in MATLAB

MAT 343 Laboratory 1 Matrix and Vector Computations in MATLAB MAT 343 Laboratory 1 Matrix and Vector Computations in MATLAB In this laboratory session we will learn how to 1. Create matrices and vectors. 2. Manipulate matrices and create matrices of special types

More information

Software Testing. 1. Testing is the process of demonstrating that errors are not present.

Software Testing. 1. Testing is the process of demonstrating that errors are not present. What is Testing? Software Testing Many people understand many definitions of testing :. Testing is the process of demonstrating that errors are not present.. The purpose of testing is to show that a program

More information

CSCE 314 TAMU Fall CSCE 314: Programming Languages Dr. Flemming Andersen. Haskell Functions

CSCE 314 TAMU Fall CSCE 314: Programming Languages Dr. Flemming Andersen. Haskell Functions 1 CSCE 314: Programming Languages Dr. Flemming Andersen Haskell Functions 2 Outline Defining Functions List Comprehensions Recursion 3 Conditional Expressions As in most programming languages, functions

More information