![]() Here, the p-value of 0.0006 indicates a statistically significant relationship between X and Y. To reject the null hypothesis, usually we need a p-value lower than 0.05. It tests the null hypothesis that the R-square is equal to 0. Prob > F = 0.0006 : This is the p-value of the model.regress csat expense Source | SS df MS Number of obs = 51 Stata will give us the following output table. Here, csat is the outcome variable and expense is the predictor variable. To run a simple linear regression model which pertains to one dependent variable and one independent variable, type: Graph matrix csat expense percent income high college, half ![]() A negative value indicates an inverse relationship (roughly, when one goes up the other goes down).Ĭommand graph matrix produces a graphical representation of the correlation matrix by presenting a series of scatter plots for all variables. In the table, numbers are Pearson correlation coefficients, go from -1 to 1. pwcorr csat expense percent income high college, star(0.05) sig | csat expense percent income high college Pwcorr csat expense percent income high college, star(0.05) sig To check correlation matrix of the variables we are interested in, type: summarize csat expense percent income high college region Variable | Obs Mean Std. Summarize csat expense percent income high college region To get the summary statistics of the variables, type: Region byte %9.0g region Geographical region Income double %10.0g Median household income, $1,000Ĭollege float %9.0g % adults college degree Percent byte %9.0g % HS graduates taking SAT Variable name type format label variable labelĮxpense int %9.0g Per pupil expenditures prim&sec describe csat expense percent income high college region storage display value To get basic information/description about data and variables, type:ĭescribe csat expense percent income high college region It is recommended first to examine the variables in the model to understand the characteristics of data. % adults with a college degree ( college) Per pupil expenditures primary & secondary ( expense) – Outcome (Y) variable – SAT scores, variable csat in the dataset In Stata, use the command regress, type: regress regress y xīefore running a regression, it is recommended to have a clear idea of what you are trying to estimate (i.e., your outcome and predictor variables).Ī regression makes sense only if there is a sound theory behind it.Įxample: Are SAT scores higher in states that spend more money on education controlling by other factors? Technically, linear regression estimates how much Y changes when X changes one unit. (2) this relationship is additive (i.e., Y= x1 + x2 + …+ xN) (1) there is a linear relationship between two variables (i.e., X and Y) and When running a regression, we are making two assumptions, We use regression to estimate the unknown effect of changing one variable over another (Stock and Watson, 2019, ch.
0 Comments
Leave a Reply. |