range: [1,20] units: 1 unique values: 20 missing.: 0/20 percentiles: 10% 25% 50% 75% 90%

Size: px
Start display at page:

Download "range: [1,20] units: 1 unique values: 20 missing.: 0/20 percentiles: 10% 25% 50% 75% 90%"

Transcription

1 log: \Term 2\Lecture_2s\regression1a.log log type: text opened on: 22 Feb 2008, 03:29:09. cmdlog using " \Term 2\Lecture_2s\regression1a.do" (cmdlog \Term 2\Lecture_2s\regression1a.do opened). use " \Term 2\Lecture_2s\data01.dta", clear. d Contains data from \Term 2\Lecture_2s\data01.dta obs: 20 vars: 2 14 Jan :27 size: 180 (99.9% of memory free) storage display value variable name type format label variable label x byte %8.0g y float %9.0g Sorted by:. codebook x (unlabeled) type: numeric (byte) range: [1,20] units: 1 unique values: 20 missing.: 0/20 mean: 10.5 std. dev: percentiles: 10% 25% 50% 75% 90% y (unlabeled) type: numeric (float) range: [-1.75,20.74] units:.01 unique values: 20 missing.: 0/20 mean: std. dev: percentiles: 10% 25% 50% 75% 90% scatter y x 1

2 y x. *Perform a simple linear regression and check that you understand the output produced. regress y x Source SS df MS Number of obs = F( 1, 18) = Model Prob > F = Residual R-squared = Adj R-squared = Total Root MSE = y Coef. Std. Err. t P> t [95% Conf. Interval] x _cons * Number of obs = 20 The number of observations used in the model. This might differ from the total number of observations reported by describe if there are missing values.. *Small table on the right. SS = Sum of Squares, df = degrees of freedom, MS = Mean Square = SS/df.. *SS total = sum of squares of (individual observations of the outcome - mean outcome). *Residual SS = sum of squares of (individual observations of the outcome - corresponding values based on the model). *Model SS = total SS - Residual SS. *Model df = number of regressors in the model here only x so 1. *Total df = number of obs - 1 = 20-1 =19. * F ( 1, 18) is the F-statistic obtained by Model MS / Residual MS and referred to an F-distribution with df 1 and 18. * Prob > F = P-value of the F-statistic = when referred to an f (1,18). The P- value in this case is indicating that at least one of the coefficients of the terms in the model is significantly different than zero. 2

3 . * R -squared measures the amount of variability in the outcome (y) explained by the predictor variables (x). So in this case x explains 36% of variability in y. It is obtained by dividing Model SS by total SS.. * Adjusted R - squared it is R-sqaured adjusted by the number of parameters in the model it is calculated as adj Rsquared = 1 - (n-1)(1-rsquared)/(n-p) here p = 2 (one parameter for the constant term and the other for x), n = 20 and Rsquared = * Root MSE = sqrt (Residual MS) (see for more details).. * The big table columns are as follows, respectively: name of variables in the model, estimated coefficients, Standard error of estimated coefficients, t-statistic = Coef./Std. Err., P > t is the corresponding P-value for the t-statistic when referred to a t-distribution with df = df of the residual = 18, and lower and upper bounds for a 95% CI.. *The fitted model is y = x. Based on the P-value for x, x is a significant predictor of y. This could also been deduced from the fact that the P-value for the F-statistic is significant and x is the only regressor. We could also have looked at the CI which does not include 0, where 0 is the null-hypothesis of no association between x and y.. * The following command shows how the P-value reported for x (you can do the same for the constant) was obtained.. display 2*ttail(18,3.20) *Interpretation: An increase in one unit in x leads to an increase in units in mean y with a corresponding 95% ranging from to ***Check that the residuals from your model are normal and homoscedastic.. predict fit (option xb assumed; fitted values). *The above command calculates the predicted values based on the model and generates a new variable called fit to store them. * Let us see how it does it, by looking at observation 6 so. list in x y fit *Here x = 6, y = 0.24 and fitted value according to model is 7.94, this value was calculated by. display ( *6) *Not a great fit for this particular observation.. * xb assumed means the calculations carried are based on the linear bit of the regression model.. scatter y x line fit x. * (scatter y x line fit x) overlay the fitted line to the scatterplot.. graph export "F:\Term 2\Lecture_2s\Figure1.2.wmf", as(wmf) (file F:\Term 2\Lecture_2s\Figure1.2.wmf written in Windows Metafile format). * The previous command would export the graph in a Windows Metafile format (wmf) so that we can insert it in a word document and it will call the graph Figure1.2.wmf. If you do not specify the path it will save the 3

4 file in the directory C: \Data unless you have already changed the directory to your work area. Note that if you are working on a network such as the computer lab you will not be able to write to the C:\Data because you have no writing privileges to this directory. Therefore, you have either to change the directory or specify the pathway..* Here is the graph y/fitted values x y Fitted values. * To check for normality you can plot a qqplot or a histogram for the residuals. predict res1, residuals. qnorm res1 4

5 Standardized residuals Inverse Normal. * The command (predict res1, residuals) predicts the residuals, it is simply y - fit. *The command (qnorm res1) plots a QQ-normal plot for the residuals based on this graph there are no gross departures from normality. *Alternatively, you can look at the standardised residuals.. predict rstres, rstandard. qnorm rstres. *now let us save this graph. graph export "F:\Term 2\Lecture_2s\Figure1.3.wmf", as(wmf) replace (file F:\Term 2\Lecture_2s\Figure1.3.wmf written in Windows Metafile format). * To check for same variance ( homoscedasticity) we plot residuals versus fitted values. scatter rstres fit 5

6 Standardized residuals Fitted values. graph export "F:\Term 2\Lecture_2s\Figure1.4.wmf", as(wmf) replace (file F:\Term 2\Lecture_2s\Figure1.4.wmf written in Windows Metafile format). * What do you think?. ****Plot a graph of the fitted line with 95% confidence bands and tolerance bands, overlayed. predict confse, stdp. * The above command generates the variable confse which is the standard error of the prediction. This is so because we specified the option stdp.. generate confup=fit+1.96*confse. * (generate confup=fit+1.96*confse) will generate the variable confup which is the fitted values * SE of the fitted values. generate confdn=fit-1.96*confse. * (generate confdn=fit-1.96*confse) will generate the variable confdn which is the fitted values * SE of the fitted values. this will give the lower bound of the confidence band.. scatter y x line fit x line confup x line confdn x 6

7 y/fitted values/confup/confdn x y confup Fitted values confdn. * (scatter y x line fit x line confup x line confdn x) will overlay a scatter plot of the observed values for y and x with a fitted line based on the model and a corresponding confidence band. Can you tune this graph so that the colours of the confidence band are the same and add a title to this graph?. graph export "F:\Term 2\Lecture_2s\Figure1.5.wmf", as(wmf) (file F:\Term 2\Lecture_2s\Figure1.5.wmf written in Windows Metafile format). *For the tolerance band we use the following commands. predict tol, stdf. generate toldn=fit-1.96*tol. generate tolup=fit+1.96*tol. scatter y x line fit x line tolup x line toldn x 7

8 y/fitted values/tolup/toldn x y tolup Fitted values toldn. graph export "F:\Term 2\Lecture_2s\Figure1.6.wmf", as(wmf) (file F:\Term 2\Lecture_2s\Figure1.6.wmf written in Windows Metafile format). *Calculate the (Pearson) correlation coefficient between x and y. Can you notice a connection?. corr y x (obs=20) y x y x * The correlation coefficient is It is the square-root of R-squared reported in the regression output. That is R-squared is the square of this value.. display ^ ***************Q2 Regression and the t-test*************. use "F:\Term 2\Lecture_2s\data03.dta", clear. d Contains data from F:\Term 2\Lecture_2s\data03.dta obs: 40 vars: 2 16 Jan :12 size: 360 (99.9% of memory free) 8

9 storage display value variable name type format label variable label z float %9.0g gp byte %8.0g Sorted by:. sort gp. by gp: sum z -> gp = 0 Variable Obs Mean Std. Dev. Min Max z > gp = 1 Variable Obs Mean Std. Dev. Min Max z * We see that for group 0 the mean is approximately zero with SD of approximately 1. For group 1 the mean is approximately 2 with SD of approximately 1.. regress z gp Source SS df MS Number of obs = F( 1, 38) = Model Prob > F = Residual R-squared = Adj R-squared = Total Root MSE = z Coef. Std. Err. t P> t [95% Conf. Interval] gp _cons *Here note that there is no need for an indicator variable format as the gp is coded as 0, 1.. *The moel that we fitted is z = * gp. * Therefore for some one in gp 0 the mean predicted value is (is it the same as that reported by the previous command?). *For someone in gp 1 the mean predicted value is display ( ) * compare to the previous command.. *Based on the regression output gp is a significant predictor for z. It explains 51% of the variation in z. Therefore, there is association between z and gp. 9

10 . use "F:\Term 2\Lecture_2s\data04.dta", clear. d Contains data from F:\Term 2\Lecture_2s\data04.dta obs: 20 vars: 2 16 Jan :13 size: 240 (99.9% of memory free) storage display value variable name type format label variable label x float %9.0g y float %9.0g Sorted by:. sum x y Variable Obs Mean Std. Dev. Min Max x y *observations in x are those for gp 0 and in y are those for gp 1.. ttest x = y, unpaired Two-sample t test with equal variances Variable Obs Mean Std. Err. Std. Dev. [95% Conf. Interval] x y combined diff Degrees of freedom: 38 Ho: mean(x) - mean(y) = diff = 0 Ha: diff < 0 Ha: diff!= 0 Ha: diff > 0 t = t = t = P < t = P > t = P > t = * The above output corresponds to a ttest of unpaired data and assuming equal variance (you can check for this by using sdtest). However, we need to make this assumption in order to compare to the results from the regression.. *The first part of the table gives summary stats for each group.. *The second part ( combined) gives summary statistics for the combined group, if you do a (ci z) in the previous data set you will get the same ouptut.. *Here it is.*. ci z Variable Obs Mean Std. Err. [95% Conf. Interval] z

11 . *The third part (diff) gives summary statistics of the difference so mean difference is. display ( ) *Compare this to the coefficient of gp in the previous output.. display (sqrt( ^ ^2)) * (display (sqrt( ^ ^2)) ) gives the combined SE. The 95% CI is obtained by. display ( invttail(38,0.975) * ) display ( invttail(38,0.975) * ) display invttail(38,0.975) *This is the critical value of t-distribution with df = 38 = 40-2 and a probability as we want a two-sided 95% CI (so 95% in between.). Note that this value is close to * To use the ttest we are assuming that the variables are normally distributed, Can you check that? However, note that ttest is robust to departures from normality.. *The last part of the output gives you the P-values of the different hypotheses that one can investigate for the difference between two means. Note you should not pick and choose your hypotheses according to the displayed P-values. You should have a prior hypothesis that you are interested in. In our case we are interested in the two sided one so we look at the column with Ha (stands for alternative hypothesis)! = 0. The combined sign!= means not equal. The t is the value of the t-statistic = Mean diff /SE diff. The P-value associated with this statistic is P > t (read as absolute t since we are interested in a two-sided test). It is calculated by referring the t-statistic to the t-distribution with df = 38 = According to this value the two means are statistically significantly different. In other words, there is an association between the outcome and the group.. ***************************************************************************************. ***********Q3: The idea of this exercise is to give you practice in interpreting the distribution of residuals in order to help you check regression model assumptions.. use "F:\Term 2\Lecture_2s\data05.dta", clear. d Contains data from F:\Term 2\Lecture_2s\data05.dta obs: 100 vars: 6 16 Jan :33 size: 2,800 (99.7% of memory free) storage display value variable name type format label variable label normvar float %9.0g tvar float %9.0g chivar float %9.0g uvar float %9.0g cauchyvar float %9.0g 11

12 mixvar float %9.0g Sorted by:. * The name of the variable reflects which distribution they have been generated from.. *normvar = normal variable mean zero and variance one.. *tvar = t-distribution variable with df two.. * Chivar =chi-squared variable with df two. *uvar = uniform variable on the interval zero to one.. *cauchyvar = Cauchy variable (note that t-distribution is a special case of the Cauchy distribution) location 0, scale 1. *mixvar = mixed variable of two distributions: unit variance normals with means 0 and 4. *The following commands graph the histograms for each variable overlaid with a normal graph and saves each graph separately.. hist normvar, title("normal(0, 1)") normal (bin=10, start= , width= ). graph save q1.gph, replace (file q1.gph saved). hist tvar, title("t(df(2))") normal (bin=10, start= , width= ). graph save q2.gph, replace (file q2.gph saved). hist chivar, title("chi(df(2))") normal (bin=10, start= , width= ). graph save q3.gph, replace (file q3.gph saved). hist uvar, title("uniform(0,1)") normal (bin=10, start= , width= ). graph save q4.gph, replace (file q4.gph saved). hist cauchyvar, title("cauchy(0,1)") normal (bin=10, start= , width= ). graph save q5.gph, replace (file q5.gph saved). hist mixvar, title("normal(0,1)+normal(4,1)") normal (bin=10, start= , width= ). graph save q6.gph, replace (file q6.gph saved) *The following command combines the different graphs into one graph. graph combine q1.gph q2.gph q3.gph q4.gph q5.gph q6.gph, saving(hist) (file hist.gph saved) 12

13 Normal(0, 1) t(df(2)) chi(df(2)) Density Density Density normvar tvar chivar Density uniform(0,1) Density Cauchy(0,1) Density Normal(0,1)+Normal(4,1) uvar cauchyvar mixvar *This one exports to WMF.. graph export "F:\Term 2\Lecture_2s\Figure3.1.wmf", as(wmf) (file F:\Term 2\Lecture_2s\Figure3.1.wmf written in Windows Metafile format). graph drop q1.gph q2.gph q3.gph q4.gph q5.gph q6.gph *Next we plot the QQ normal plots for the above variables.. qnorm normvar, title("normal(0, 1)"). graph save q1.gph, replace (file q1.gph saved). qnorm tvar, title("t(df(2))"). graph save q2.gph (file q2.gph saved). qnorm chivar, title("chi(df(2))"). graph save q3.gph (file q3.gph saved). qnorm uvar, title("uniform(0,1)"). graph save q4.gph (file q4.gph saved) 13

14 . qnorm cauchyvar, title("cauchy(0,1)"). graph save q5.gph (file q5.gph saved). qnorm mixvar, title("normal(0,1)+normal(4,1)"). graph save q6.gph (file q6.gph saved). graph combine q1.gph q2.gph q3.gph q4.gph q5.gph q6.gph, saving(qnorm) (file qnorm.gph saved) Normal 0 1 t(df(2)) chi(df(2)) normvar Inverse Normal tvar Inverse Normal chivar Inverse Normal uvar uniform(0,1) cauchyvar Cauchy(0,1) mixvar Normal(0,1)+Normal(4,1) Inverse Normal Inverse Normal Inverse Normal. graph export "F:\Term 2\Lecture_2s\Figure3.2.wmf", as(wmf) (file F:\Term 2\Lecture_2s\Figure3.2.wmf written in Windows Metafile format). * You can do the same using (pnorm). * To do for separate samples you can either use 1/20 or 10/30 (note that these will not be random sample). If you use the command (sample 20) it will give you 20 observations selected randomly. *************************************************************************************** 14

15 *************************Q4 Interaction term. use "F:\Term 2\Lecture_2s\data02.dta", clear. d Contains data from F:\Term 2\Lecture_2s\data02.dta obs: 100 vars: 3 16 Jan :12 size: 1,300 (99.9% of memory free) storage display value variable name type format label variable label x float %9.0g y float %9.0g gp byte %8.0g Sorted by:. codebook x (unlabeled) type: numeric (float) range: [1,40] units:.01 unique values: 100 missing.: 0/100 mean: 20.5 std. dev: percentiles: 10% 25% 50% 75% 90% y (unlabeled) type: numeric (float) range: [9.29,41.83] units:.01 unique values: 98 missing.: 0/100 mean: std. dev: percentiles: 10% 25% 50% 75% 90% gp (unlabeled) type: numeric (byte) range: [0,1] units: 1 15

16 unique values: 2 missing.: 0/100 tabulation: Freq. Value sort gp. by gp: summ x y -> gp = 0 Variable Obs Mean Std. Dev. Min Max x y > gp = 1 Variable Obs Mean Std. Dev. Min Max x y regress y x gp Source SS df MS Number of obs = F( 2, 97) = Model Prob > F = Residual R-squared = Adj R-squared = Total Root MSE = y Coef. Std. Err. t P> t [95% Conf. Interval] x gp _cons *Interpret the output. gen xgp = x* gp. regress y x gp xgp Source SS df MS Number of obs = F( 3, 96) = Model Prob > F = Residual R-squared = Adj R-squared = Total Root MSE = y Coef. Std. Err. t P> t [95% Conf. Interval] x gp

17 xgp _cons *So is there interaction?. predict fit (option xb assumed; fitted values). scatter y x line fit x if gp==0 line fit x if gp==1 y/fitted values x y Fitted values Fitted values. graph export "F:\Term 2\Lecture_2s\Figure4.1.wmf", as(wmf) (file F:\Term 2\Lecture_2s\Figure4.1.wmf written in Windows Metafile format). *Alternatively, for the interaction you could have used.. xi: regress y i.gp*x i.gp _Igp_0-1 (naturally coded; _Igp_0 omitted) i.gp*x _IgpXx_# (coded as above) Source SS df MS Number of obs = F( 3, 96) = Model Prob > F = Residual R-squared = Adj R-squared = Total Root MSE = y Coef. Std. Err. t P> t [95% Conf. Interval] 17

18 _Igp_ x _IgpXx_ _cons *Comapre to the previous output. *****************************************. ***Q 5 Functional Form: The idea of this exercise is for you to explore the information that exploratory and residual plots give you about the possible functional form for an explanatory variable... clear. set obs 20 obs was 0, now 20. * (set obs 20) opens space in memory for 20 observations.. g x = _n. *(g x = _n) generates a variable from 1 to 20.. gen y = sqrt(x) + 0.1*invnormal(uniform()). *y = sqrt(x) + error term from the normal distribution (0, 0.1). regress y x Source SS df MS Number of obs = F( 1, 18) = Model Prob > F = Residual R-squared = Adj R-squared = Total Root MSE = y Coef. Std. Err. t P> t [95% Conf. Interval] x _cons predict fit (option xb assumed; fitted values). scatter y x line fit x 18

19 x y Fitted values. graph export "F:\Term 2\Lecture_2s\Figure5.1.wmf", as(wmf) (file F:\Term 2\Lecture_2s\Figure5.1.wmf written in Windows Metafile format). predict rstres, rst Standardized residuals Inverse Normal 19

20 . scatter rstres x Standardized residuals x * So what do you think this is telling you? Are the two linearly related? You can also look at other transformations or using other Normal distributions for example, try the following repeating the above gen y = sqrt(x) + 2*invnormal(uniform()) gen y = x^ *invnormal(uniform()) gen y = ln(x) + 0.3*invnormal(uniform()) You can also try different sizes by varying (set obs ----) Mona Kanaan Feb

Bivariate (Simple) Regression Analysis

Bivariate (Simple) Regression Analysis Revised July 2018 Bivariate (Simple) Regression Analysis This set of notes shows how to use Stata to estimate a simple (two-variable) regression equation. It assumes that you have set Stata up on your

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

PubHlth 640 Intermediate Biostatistics Unit 2 - Regression and Correlation. Simple Linear Regression Software: Stata v 10.1

PubHlth 640 Intermediate Biostatistics Unit 2 - Regression and Correlation. Simple Linear Regression Software: Stata v 10.1 PubHlth 640 Intermediate Biostatistics Unit 2 - Regression and Correlation Simple Linear Regression Software: Stata v 10.1 Emergency Calls to the New York Auto Club Source: Chatterjee, S; Handcock MS and

More information

Stata versions 12 & 13 Week 4 Practice Problems

Stata versions 12 & 13 Week 4 Practice Problems Stata versions 12 & 13 Week 4 Practice Problems SOLUTIONS 1 Practice Screen Capture a Create a word document Name it using the convention lastname_lab1docx (eg bigelow_lab1docx) b Using your browser, go

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

THE LINEAR PROBABILITY MODEL: USING LEAST SQUARES TO ESTIMATE A REGRESSION EQUATION WITH A DICHOTOMOUS DEPENDENT VARIABLE

THE LINEAR PROBABILITY MODEL: USING LEAST SQUARES TO ESTIMATE A REGRESSION EQUATION WITH A DICHOTOMOUS DEPENDENT VARIABLE PLS 802 Spring 2018 Professor Jacoby THE LINEAR PROBABILITY MODEL: USING LEAST SQUARES TO ESTIMATE A REGRESSION EQUATION WITH A DICHOTOMOUS DEPENDENT VARIABLE This handout shows the log of a Stata session

More information

Quantitative - One Population

Quantitative - One Population Quantitative - One Population The Quantitative One Population VISA procedures allow the user to perform descriptive and inferential procedures for problems involving one population with quantitative (interval)

More information

Soci Statistics for Sociologists

Soci Statistics for Sociologists University of North Carolina Chapel Hill Soci708-001 Statistics for Sociologists Fall 2009 Professor François Nielsen Stata Commands for Module 7 Inference for Distributions For further information on

More information

SOCY7706: Longitudinal Data Analysis Instructor: Natasha Sarkisian. Panel Data Analysis: Fixed Effects Models

SOCY7706: Longitudinal Data Analysis Instructor: Natasha Sarkisian. Panel Data Analysis: Fixed Effects Models SOCY776: Longitudinal Data Analysis Instructor: Natasha Sarkisian Panel Data Analysis: Fixed Effects Models Fixed effects models are similar to the first difference model we considered for two wave data

More information

Week 5: Multiple Linear Regression II

Week 5: Multiple Linear Regression II Week 5: Multiple 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 Adjusted R

More information

An Introductory Guide to Stata

An Introductory Guide to Stata An Introductory Guide to Stata Scott L. Minkoff Assistant Professor Department of Political Science Barnard College sminkoff@barnard.edu Updated: July 9, 2012 1 TABLE OF CONTENTS ABOUT THIS GUIDE... 4

More information

Regression Analysis and Linear Regression Models

Regression Analysis and Linear Regression Models Regression Analysis and Linear Regression Models University of Trento - FBK 2 March, 2015 (UNITN-FBK) Regression Analysis and Linear Regression Models 2 March, 2015 1 / 33 Relationship between numerical

More information

. predict mod1. graph mod1 ed, connect(l) xlabel ylabel l1(model1 predicted income) b1(years of education)

. predict mod1. graph mod1 ed, connect(l) xlabel ylabel l1(model1 predicted income) b1(years of education) DUMMY VARIABLES AND INTERACTIONS Let's start with an example in which we are interested in discrimination in income. We have a dataset that includes information for about 16 people on their income, their

More information

Panel Data 4: Fixed Effects vs Random Effects Models

Panel Data 4: Fixed Effects vs Random Effects Models Panel Data 4: Fixed Effects vs Random Effects Models Richard Williams, University of Notre Dame, http://www3.nd.edu/~rwilliam/ Last revised April 4, 2017 These notes borrow very heavily, sometimes verbatim,

More information

Introduction to Stata: An In-class Tutorial

Introduction to Stata: An In-class Tutorial Introduction to Stata: An I. The Basics - Stata is a command-driven statistical software program. In other words, you type in a command, and Stata executes it. You can use the drop-down menus to avoid

More information

Stata Session 2. Tarjei Havnes. University of Oslo. Statistics Norway. ECON 4136, UiO, 2012

Stata Session 2. Tarjei Havnes. University of Oslo. Statistics Norway. ECON 4136, UiO, 2012 Stata Session 2 Tarjei Havnes 1 ESOP and Department of Economics University of Oslo 2 Research department Statistics Norway ECON 4136, UiO, 2012 Tarjei Havnes (University of Oslo) Stata Session 2 ECON

More information

Introduction to Statistical Analyses in SAS

Introduction to Statistical Analyses in SAS Introduction to Statistical Analyses in SAS Programming Workshop Presented by the Applied Statistics Lab Sarah Janse April 5, 2017 1 Introduction Today we will go over some basic statistical analyses in

More information

Lab 2: OLS regression

Lab 2: OLS regression Lab 2: OLS regression Andreas Beger February 2, 2009 1 Overview This lab covers basic OLS regression in Stata, including: multivariate OLS regression reporting coefficients with different confidence intervals

More information

1 Introducing Stata sample session

1 Introducing Stata sample session 1 Introducing Stata sample session Introducing Stata This chapter will run through a sample work session, introducing you to a few of the basic tasks that can be done in Stata, such as opening a dataset,

More information

schooling.log 7/5/2006

schooling.log 7/5/2006 ----------------------------------- log: C:\dnb\schooling.log log type: text opened on: 5 Jul 2006, 09:03:57. /* schooling.log */ > use schooling;. gen age2=age76^2;. /* OLS (inconsistent) */ > reg lwage76

More information

Review of Stata II AERC Training Workshop Nairobi, May 2002

Review of Stata II AERC Training Workshop Nairobi, May 2002 Review of Stata II AERC Training Workshop Nairobi, 20-24 May 2002 This note provides more information on the basics of Stata that should help you with the exercises in the remaining sessions of the workshop.

More information

STAT 2607 REVIEW PROBLEMS Word problems must be answered in words of the problem.

STAT 2607 REVIEW PROBLEMS Word problems must be answered in words of the problem. STAT 2607 REVIEW PROBLEMS 1 REMINDER: On the final exam 1. Word problems must be answered in words of the problem. 2. "Test" means that you must carry out a formal hypothesis testing procedure with H0,

More information

THIS IS NOT REPRESNTATIVE OF CURRENT CLASS MATERIAL. STOR 455 Midterm 1 September 28, 2010

THIS IS NOT REPRESNTATIVE OF CURRENT CLASS MATERIAL. STOR 455 Midterm 1 September 28, 2010 THIS IS NOT REPRESNTATIVE OF CURRENT CLASS MATERIAL STOR 455 Midterm September 8, INSTRUCTIONS: BOTH THE EXAM AND THE BUBBLE SHEET WILL BE COLLECTED. YOU MUST PRINT YOUR NAME AND SIGN THE HONOR PLEDGE

More information

ST512. Fall Quarter, Exam 1. Directions: Answer questions as directed. Please show work. For true/false questions, circle either true or false.

ST512. Fall Quarter, Exam 1. Directions: Answer questions as directed. Please show work. For true/false questions, circle either true or false. ST512 Fall Quarter, 2005 Exam 1 Name: Directions: Answer questions as directed. Please show work. For true/false questions, circle either true or false. 1. (42 points) A random sample of n = 30 NBA basketball

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 9: Modeling II. Marcelo Coca Perraillon. Health Services Research Methods I HSMP University of Colorado Anschutz Medical Campus

Week 9: Modeling II. Marcelo Coca Perraillon. Health Services Research Methods I HSMP University of Colorado Anschutz Medical Campus Week 9: Modeling II Marcelo Coca Perraillon University of Colorado Anschutz Medical Campus Health Services Research Methods I HSMP 7607 2017 c 2017 PERRAILLON ARR 1 Outline Taking the log Retransformation

More information

Introduction to Hierarchical Linear Model. Hsueh-Sheng Wu CFDR Workshop Series January 30, 2017

Introduction to Hierarchical Linear Model. Hsueh-Sheng Wu CFDR Workshop Series January 30, 2017 Introduction to Hierarchical Linear Model Hsueh-Sheng Wu CFDR Workshop Series January 30, 2017 1 Outline What is Hierarchical Linear Model? Why do nested data create analytic problems? Graphic presentation

More information

ECON Stata course, 3rd session

ECON Stata course, 3rd session ECON4150 - Stata course, 3rd session Andrea Papini Heavily based on last year s session by Tarjei Havnes February 4, 2016 Stata course, 3rd session February 4, 2016 1 / 19 Before we start 1. Download caschool.dta

More information

Section 2.3: Simple Linear Regression: Predictions and Inference

Section 2.3: Simple Linear Regression: Predictions and Inference Section 2.3: Simple Linear Regression: Predictions and Inference Jared S. Murray The University of Texas at Austin McCombs School of Business Suggested reading: OpenIntro Statistics, Chapter 7.4 1 Simple

More information

ECON Introductory Econometrics Seminar 4

ECON Introductory Econometrics Seminar 4 ECON4150 - Introductory Econometrics Seminar 4 Stock and Watson EE8.2 April 28, 2015 Stock and Watson EE8.2 ECON4150 - Introductory Econometrics Seminar 4 April 28, 2015 1 / 20 Current Population Survey

More information

Applied Regression Modeling: A Business Approach

Applied Regression Modeling: A Business Approach i Applied Regression Modeling: A Business Approach Computer software help: SAS SAS (originally Statistical Analysis Software ) is a commercial statistical software package based on a powerful programming

More information

Empirical Asset Pricing

Empirical Asset Pricing Department of Mathematics and Statistics, University of Vaasa, Finland Texas A&M University, May June, 2013 As of May 17, 2013 Part I Stata Introduction 1 Stata Introduction Interface Commands Command

More information

piecewise ginireg 1 Piecewise Gini Regressions in Stata Jan Ditzen 1 Shlomo Yitzhaki 2 September 8, 2017

piecewise ginireg 1 Piecewise Gini Regressions in Stata Jan Ditzen 1 Shlomo Yitzhaki 2 September 8, 2017 piecewise ginireg 1 Piecewise Gini Regressions in Stata Jan Ditzen 1 Shlomo Yitzhaki 2 1 Heriot-Watt University, Edinburgh, UK Center for Energy Economics Research and Policy (CEERP) 2 The Hebrew University

More information

Subset Selection in Multiple Regression

Subset Selection in Multiple Regression Chapter 307 Subset Selection in Multiple Regression Introduction Multiple regression analysis is documented in Chapter 305 Multiple Regression, so that information will not be repeated here. Refer to that

More information

1 Downloading files and accessing SAS. 2 Sorting, scatterplots, correlation and regression

1 Downloading files and accessing SAS. 2 Sorting, scatterplots, correlation and regression Statistical Methods and Computing, 22S:30/105 Instructor: Cowles Lab 2 Feb. 6, 2015 1 Downloading files and accessing SAS. We will be using the billion.dat dataset again today, as well as the OECD dataset

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

Linear regression Number of obs = 6,866 F(16, 326) = Prob > F = R-squared = Root MSE =

Linear regression Number of obs = 6,866 F(16, 326) = Prob > F = R-squared = Root MSE = - /*** To demonstrate use of 2SLS ***/ * Case: In the early 1990's Tanzania implemented a FP program to reduce fertility, which was among the highest in the world * The FP program had two main components:

More information

Statistics Lab #7 ANOVA Part 2 & ANCOVA

Statistics Lab #7 ANOVA Part 2 & ANCOVA Statistics Lab #7 ANOVA Part 2 & ANCOVA PSYCH 710 7 Initialize R Initialize R by entering the following commands at the prompt. You must type the commands exactly as shown. options(contrasts=c("contr.sum","contr.poly")

More information

Learner Expectations UNIT 1: GRAPICAL AND NUMERIC REPRESENTATIONS OF DATA. Sept. Fathom Lab: Distributions and Best Methods of Display

Learner Expectations UNIT 1: GRAPICAL AND NUMERIC REPRESENTATIONS OF DATA. Sept. Fathom Lab: Distributions and Best Methods of Display CURRICULUM MAP TEMPLATE Priority Standards = Approximately 70% Supporting Standards = Approximately 20% Additional Standards = Approximately 10% HONORS PROBABILITY AND STATISTICS Essential Questions &

More information

Multiple Regression White paper

Multiple Regression White paper +44 (0) 333 666 7366 Multiple Regression White paper A tool to determine the impact in analysing the effectiveness of advertising spend. Multiple Regression In order to establish if the advertising mechanisms

More information

A quick introduction to STATA

A quick introduction to STATA A quick introduction to STATA Data files and other resources for the course book Introduction to Econometrics by Stock and Watson is available on: http://wps.aw.com/aw_stock_ie_3/178/45691/11696965.cw/index.html

More information

Introduction to STATA 6.0 ECONOMICS 626

Introduction to STATA 6.0 ECONOMICS 626 Introduction to STATA 6.0 ECONOMICS 626 Bill Evans Fall 2001 This handout gives a very brief introduction to STATA 6.0 on the Economics Department Network. In a few short years, STATA has become one of

More information

THE UNIVERSITY OF BRITISH COLUMBIA FORESTRY 430 and 533. Time: 50 minutes 40 Marks FRST Marks FRST 533 (extra questions)

THE UNIVERSITY OF BRITISH COLUMBIA FORESTRY 430 and 533. Time: 50 minutes 40 Marks FRST Marks FRST 533 (extra questions) THE UNIVERSITY OF BRITISH COLUMBIA FORESTRY 430 and 533 MIDTERM EXAMINATION: October 14, 2005 Instructor: Val LeMay Time: 50 minutes 40 Marks FRST 430 50 Marks FRST 533 (extra questions) This examination

More information

/23/2004 TA : Jiyoon Kim. Recitation Note 1

/23/2004 TA : Jiyoon Kim. Recitation Note 1 Recitation Note 1 This is intended to walk you through using STATA in an Athena environment. The computer room of political science dept. has STATA on PC machines. But, knowing how to use it on Athena

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

Week 11: Interpretation plus

Week 11: Interpretation plus Week 11: Interpretation plus Marcelo Coca Perraillon University of Colorado Anschutz Medical Campus Health Services Research Methods I HSMP 7607 2017 c 2017 PERRAILLON ARR 1 Outline A bit of a patchwork

More information

CREATING THE ANALYSIS

CREATING THE ANALYSIS Chapter 14 Multiple Regression Chapter Table of Contents CREATING THE ANALYSIS...214 ModelInformation...217 SummaryofFit...217 AnalysisofVariance...217 TypeIIITests...218 ParameterEstimates...218 Residuals-by-PredictedPlot...219

More information

Introduction to STATA

Introduction to STATA Center for Teaching, Research and Learning Research Support Group American University, Washington, D.C. Hurst Hall 203 rsg@american.edu (202) 885-3862 Introduction to STATA WORKSHOP OBJECTIVE: This workshop

More information

CH5: CORR & SIMPLE LINEAR REFRESSION =======================================

CH5: CORR & SIMPLE LINEAR REFRESSION ======================================= STAT 430 SAS Examples SAS5 ===================== ssh xyz@glue.umd.edu, tap sas913 (old sas82), sas https://www.statlab.umd.edu/sasdoc/sashtml/onldoc.htm CH5: CORR & SIMPLE LINEAR REFRESSION =======================================

More information

Introduction to Programming in Stata

Introduction to Programming in Stata Introduction to in Stata Laron K. University of Missouri Goals Goals Replicability! Goals Replicability! Simplicity/efficiency Goals Replicability! Simplicity/efficiency Take a peek under the hood! Data

More information

ST Lab 1 - The basics of SAS

ST Lab 1 - The basics of SAS ST 512 - Lab 1 - The basics of SAS What is SAS? SAS is a programming language based in C. For the most part SAS works in procedures called proc s. For instance, to do a correlation analysis there is proc

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

Introduction to Stata Session 3

Introduction to Stata Session 3 Introduction to Stata Session 3 Tarjei Havnes 1 ESOP and Department of Economics University of Oslo 2 Research department Statistics Norway ECON 3150/4150, UiO, 2015 Before we start 1. In your folder statacourse:

More information

Health Disparities (HD): It s just about comparing two groups

Health Disparities (HD): It s just about comparing two groups A review of modern methods of estimating the size of health disparities May 24, 2017 Emil Coman 1 Helen Wu 2 1 UConn Health Disparities Institute, 2 UConn Health Modern Modeling conference, May 22-24,

More information

Getting started with Stata 2017: Cheat-sheet

Getting started with Stata 2017: Cheat-sheet Getting started with Stata 2017: Cheat-sheet 4. september 2017 1 Get started Graphical user interface (GUI). Clickable. Simple. Commands. Allows for use of do-le. Easy to keep track. Command window: Write

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

CDAA No. 4 - Part Two - Multiple Regression - Initial Data Screening

CDAA No. 4 - Part Two - Multiple Regression - Initial Data Screening CDAA No. 4 - Part Two - Multiple Regression - Initial Data Screening Variables Entered/Removed b Variables Entered GPA in other high school, test, Math test, GPA, High school math GPA a Variables Removed

More information

Outline. Topic 16 - Other Remedies. Ridge Regression. Ridge Regression. Ridge Regression. Robust Regression. Regression Trees. Piecewise Linear Model

Outline. Topic 16 - Other Remedies. Ridge Regression. Ridge Regression. Ridge Regression. Robust Regression. Regression Trees. Piecewise Linear Model Topic 16 - Other Remedies Ridge Regression Robust Regression Regression Trees Outline - Fall 2013 Piecewise Linear Model Bootstrapping Topic 16 2 Ridge Regression Modification of least squares that addresses

More information

Introduction to SAS. I. Understanding the basics In this section, we introduce a few basic but very helpful commands.

Introduction to SAS. I. Understanding the basics In this section, we introduce a few basic but very helpful commands. Center for Teaching, Research and Learning Research Support Group American University, Washington, D.C. Hurst Hall 203 rsg@american.edu (202) 885-3862 Introduction to SAS Workshop Objective This workshop

More information

Dr. Barbara Morgan Quantitative Methods

Dr. Barbara Morgan Quantitative Methods Dr. Barbara Morgan Quantitative Methods 195.650 Basic Stata This is a brief guide to using the most basic operations in Stata. Stata also has an on-line tutorial. At the initial prompt type tutorial. In

More information

Regression Lab 1. The data set cholesterol.txt available on your thumb drive contains the following variables:

Regression Lab 1. The data set cholesterol.txt available on your thumb drive contains the following variables: Regression Lab The data set cholesterol.txt available on your thumb drive contains the following variables: Field Descriptions ID: Subject ID sex: Sex: 0 = male, = female age: Age in years chol: Serum

More information

Centering and Interactions: The Training Data

Centering and Interactions: The Training Data Centering and Interactions: The Training Data A random sample of 150 technical support workers were first given a test of their technical skill and knowledge, and then randomly assigned to one of three

More information

Factorial ANOVA. Skipping... Page 1 of 18

Factorial ANOVA. Skipping... Page 1 of 18 Factorial ANOVA The potato data: Batches of potatoes randomly assigned to to be stored at either cool or warm temperature, infected with one of three bacterial types. Then wait a set period. The dependent

More information

Big Data Methods. Chapter 5: Machine learning. Big Data Methods, Chapter 5, Slide 1

Big Data Methods. Chapter 5: Machine learning. Big Data Methods, Chapter 5, Slide 1 Big Data Methods Chapter 5: Machine learning Big Data Methods, Chapter 5, Slide 1 5.1 Introduction to machine learning What is machine learning? Concerned with the study and development of algorithms that

More information

texdoc 2.0 An update on creating LaTeX documents from within Stata Example 2

texdoc 2.0 An update on creating LaTeX documents from within Stata Example 2 texdoc 20 An update on creating LaTeX documents from within Stata Contents Example 2 Ben Jann University of Bern, benjann@sozunibech 2016 German Stata Users Group Meeting GESIS, Cologne, June 10, 2016

More information

Minitab 17 commands Prepared by Jeffrey S. Simonoff

Minitab 17 commands Prepared by Jeffrey S. Simonoff Minitab 17 commands Prepared by Jeffrey S. Simonoff Data entry and manipulation To enter data by hand, click on the Worksheet window, and enter the values in as you would in any spreadsheet. To then save

More information

Creating LaTeX and HTML documents from within Stata using texdoc and webdoc. Example 2

Creating LaTeX and HTML documents from within Stata using texdoc and webdoc. Example 2 Creating LaTeX and HTML documents from within Stata using texdoc and webdoc Contents Example 2 Ben Jann University of Bern, benjann@sozunibech Nordic and Baltic Stata Users Group meeting Oslo, September

More information

1. Basic Steps for Data Analysis Data Editor. 2.4.To create a new SPSS file

1. Basic Steps for Data Analysis Data Editor. 2.4.To create a new SPSS file 1 SPSS Guide 2009 Content 1. Basic Steps for Data Analysis. 3 2. Data Editor. 2.4.To create a new SPSS file 3 4 3. Data Analysis/ Frequencies. 5 4. Recoding the variable into classes.. 5 5. Data Analysis/

More information

Brief Guide on Using SPSS 10.0

Brief Guide on Using SPSS 10.0 Brief Guide on Using SPSS 10.0 (Use student data, 22 cases, studentp.dat in Dr. Chang s Data Directory Page) (Page address: http://www.cis.ysu.edu/~chang/stat/) I. Processing File and Data To open a new

More information

CHAPTER 3 AN OVERVIEW OF DESIGN OF EXPERIMENTS AND RESPONSE SURFACE METHODOLOGY

CHAPTER 3 AN OVERVIEW OF DESIGN OF EXPERIMENTS AND RESPONSE SURFACE METHODOLOGY 23 CHAPTER 3 AN OVERVIEW OF DESIGN OF EXPERIMENTS AND RESPONSE SURFACE METHODOLOGY 3.1 DESIGN OF EXPERIMENTS Design of experiments is a systematic approach for investigation of a system or process. A series

More information

An Econometric Study: The Cost of Mobile Broadband

An Econometric Study: The Cost of Mobile Broadband An Econometric Study: The Cost of Mobile Broadband Zhiwei Peng, Yongdon Shin, Adrian Raducanu IATOM13 ENAC January 16, 2014 Zhiwei Peng, Yongdon Shin, Adrian Raducanu (UCLA) The Cost of Mobile Broadband

More information

One Factor Experiments

One Factor Experiments One Factor Experiments 20-1 Overview Computation of Effects Estimating Experimental Errors Allocation of Variation ANOVA Table and F-Test Visual Diagnostic Tests Confidence Intervals For Effects Unequal

More information

Stata v 12 Illustration. First Session

Stata v 12 Illustration. First Session Launch Stata PC Users Stata v 12 Illustration Mac Users START > ALL PROGRAMS > Stata; or Double click on the Stata icon on your desktop APPLICATIONS > STATA folder > Stata; or Double click on the Stata

More information

Data Analysis and Hypothesis Testing Using the Python ecosystem

Data Analysis and Hypothesis Testing Using the Python ecosystem ARISTOTLE UNIVERSITY OF THESSALONIKI Data Analysis and Hypothesis Testing Using the Python ecosystem t-test & ANOVAs Stavros Demetriadis Assc. Prof., School of Informatics, Aristotle University of Thessaloniki

More information

Lab Session 1. Introduction to Eviews

Lab Session 1. Introduction to Eviews Albert-Ludwigs University Freiburg Department of Empirical Economics Time Series Analysis, Summer 2009 Dr. Sevtap Kestel To see the data of m1: 1 Lab Session 1 Introduction to Eviews We introduce the basic

More information

STAT:5201 Applied Statistic II

STAT:5201 Applied Statistic II STAT:5201 Applied Statistic II Two-Factor Experiment (one fixed blocking factor, one fixed factor of interest) Randomized complete block design (RCBD) Primary Factor: Day length (short or long) Blocking

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

Stat 5100 Handout #6 SAS: Linear Regression Remedial Measures

Stat 5100 Handout #6 SAS: Linear Regression Remedial Measures Stat 5100 Handout #6 SAS: Linear Regression Remedial Measures Example: Age and plasma level for 25 healthy children in a study are reported. Of interest is how plasma level depends on age. (Text Table

More information

I Launching and Exiting Stata. Stata will ask you if you would like to check for updates. Update now or later, your choice.

I Launching and Exiting Stata. Stata will ask you if you would like to check for updates. Update now or later, your choice. I Launching and Exiting Stata 1. Launching Stata Stata can be launched in either of two ways: 1) in the stata program, click on the stata application; or 2) double click on the short cut that you have

More information

25 Working with categorical data and factor variables

25 Working with categorical data and factor variables 25 Working with categorical data and factor variables Contents 25.1 Continuous, categorical, and indicator variables 25.1.1 Converting continuous variables to indicator variables 25.1.2 Converting continuous

More information

6:1 LAB RESULTS -WITHIN-S ANOVA

6:1 LAB RESULTS -WITHIN-S ANOVA 6:1 LAB RESULTS -WITHIN-S ANOVA T1/T2/T3/T4. SStotal =(1-12) 2 + + (18-12) 2 = 306.00 = SSpill + SSsubj + SSpxs df = 9-1 = 8 P1 P2 P3 Ms Ms-Mg 1 8 15 8.0-4.0 SSsubj= 3x(-4 2 + ) 4 17 15 12.0 0 = 96.0 13

More information

Stata version 13. First Session. January I- Launching and Exiting Stata Launching Stata Exiting Stata..

Stata version 13. First Session. January I- Launching and Exiting Stata Launching Stata Exiting Stata.. Stata version 13 January 2015 I- Launching and Exiting Stata... 1. Launching Stata... 2. Exiting Stata.. II - Toolbar, Menu bar and Windows.. 1. Toolbar Key.. 2. Menu bar Key..... 3. Windows..... III -...

More information

A (very) brief introduction to R

A (very) brief introduction to R A (very) brief introduction to R You typically start R at the command line prompt in a command line interface (CLI) mode. It is not a graphical user interface (GUI) although there are some efforts to produce

More information

Intermediate SAS: Statistics

Intermediate SAS: Statistics Intermediate SAS: Statistics OIT TSS 293-4444 oithelp@mail.wvu.edu oit.wvu.edu/training/classmat/sas/ Table of Contents Procedures... 2 Two-sample t-test:... 2 Paired differences t-test:... 2 Chi Square

More information

Stata Training. AGRODEP Technical Note 08. April Manuel Barron and Pia Basurto

Stata Training. AGRODEP Technical Note 08. April Manuel Barron and Pia Basurto AGRODEP Technical Note 08 April 2013 Stata Training Manuel Barron and Pia Basurto AGRODEP Technical Notes are designed to document state-of-the-art tools and methods. They are circulated in order to help

More information

Stat 401 B Lecture 26

Stat 401 B Lecture 26 Stat B Lecture 6 Forward Selection The Forward selection rocedure looks to add variables to the model. Once added, those variables stay in the model even if they become insignificant at a later ste. Backward

More information

STATA 13 INTRODUCTION

STATA 13 INTRODUCTION STATA 13 INTRODUCTION Catherine McGowan & Elaine Williamson LONDON SCHOOL OF HYGIENE & TROPICAL MEDICINE DECEMBER 2013 0 CONTENTS INTRODUCTION... 1 Versions of STATA... 1 OPENING STATA... 1 THE STATA

More information

CSC 328/428 Summer Session I 2002 Data Analysis for the Experimenter FINAL EXAM

CSC 328/428 Summer Session I 2002 Data Analysis for the Experimenter FINAL EXAM options pagesize=53 linesize=76 pageno=1 nodate; proc format; value $stcktyp "1"="Growth" "2"="Combined" "3"="Income"; data invstmnt; input stcktyp $ perform; label stkctyp="type of Stock" perform="overall

More information

Applied Regression Modeling: A Business Approach

Applied Regression Modeling: A Business Approach i Applied Regression Modeling: A Business Approach Computer software help: SPSS SPSS (originally Statistical Package for the Social Sciences ) is a commercial statistical software package with an easy-to-use

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

2.830J / 6.780J / ESD.63J Control of Manufacturing Processes (SMA 6303) Spring 2008

2.830J / 6.780J / ESD.63J Control of Manufacturing Processes (SMA 6303) Spring 2008 MIT OpenCourseWare http://ocw.mit.edu.83j / 6.78J / ESD.63J Control of Manufacturing Processes (SMA 633) Spring 8 For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms.

More information

Introduction to Stata - Session 2

Introduction to Stata - Session 2 Introduction to Stata - Session 2 Siv-Elisabeth Skjelbred ECON 3150/4150, UiO January 26, 2016 1 / 29 Before we start Download auto.dta, auto.csv from course home page and save to your stata course folder.

More information

STATA Tutorial. Introduction to Econometrics. by James H. Stock and Mark W. Watson. to Accompany

STATA Tutorial. Introduction to Econometrics. by James H. Stock and Mark W. Watson. to Accompany STATA Tutorial to Accompany Introduction to Econometrics by James H. Stock and Mark W. Watson STATA Tutorial to accompany Stock/Watson Introduction to Econometrics Copyright 2003 Pearson Education Inc.

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

Unit 1 Review of BIOSTATS 540 Practice Problems SOLUTIONS - Stata Users

Unit 1 Review of BIOSTATS 540 Practice Problems SOLUTIONS - Stata Users BIOSTATS 640 Spring 2018 Review of Introductory Biostatistics STATA solutions Page 1 of 13 Key Comments begin with an * Commands are in bold black I edited the output so that it appears here in blue Unit

More information

Introduction to Stata Toy Program #1 Basic Descriptives

Introduction to Stata Toy Program #1 Basic Descriptives Introduction to Stata 2018-19 Toy Program #1 Basic Descriptives Summary The goal of this toy program is to get you in and out of a Stata session and, along the way, produce some descriptive statistics.

More information

8. MINITAB COMMANDS WEEK-BY-WEEK

8. MINITAB COMMANDS WEEK-BY-WEEK 8. MINITAB COMMANDS WEEK-BY-WEEK In this section of the Study Guide, we give brief information about the Minitab commands that are needed to apply the statistical methods in each week s study. They are

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

Selected Introductory Statistical and Data Manipulation Procedures. Gordon & Johnson 2002 Minitab version 13.

Selected Introductory Statistical and Data Manipulation Procedures. Gordon & Johnson 2002 Minitab version 13. Minitab@Oneonta.Manual: Selected Introductory Statistical and Data Manipulation Procedures Gordon & Johnson 2002 Minitab version 13.0 Minitab@Oneonta.Manual: Selected Introductory Statistical and Data

More information

Page 1. Notes: MB allocated to data 2. Stata running in batch mode. . do 2-simpower-varests.do. . capture log close. .

Page 1. Notes: MB allocated to data 2. Stata running in batch mode. . do 2-simpower-varests.do. . capture log close. . tm / / / / / / / / / / / / 101 Copyright 1984-2009 Statistics/Data Analysis StataCorp 4905 Lakeway Drive College Station, Texas 77845 USA 800-STATA-PC http://wwwstatacom 979-696-4600 stata@statacom 979-696-4601

More information