In Stata, linear regressions can be run with the ‘regress’ command. This can be abbreviated to ‘reg’ in our code to keep our commands concise. To run the ‘reg’ command appropriately, we must specify the outcome variable immediately after the ‘reg’ command in our syntax, followed by the predictor variable(s). This is the order used in the code snippet below:
Looking at the output table above, we can see that the p-value of the F-test (=61.29, p<.001) is below our adopted significance threshold of 0.05 which means we can say that the model is statistically significant. The R-squared value of 0.0135 means that approximately 1.4% of the variance of BMI at age 42 is accounted for by the model. As there is only one predictor, this means that ‘general ability’ at age 11 explains only 1.4% of the variance of BMI at age 42. The coefficient for n920 is -.0344106 or approximately -.03, meaning that for 1 unit increase in general ability, we would expect a .03 decrease in BMI at age 42. Put more simply, a study participant with a general ability score of 60 at age 11 would have a 1 unit lower BMI score at age 42 than a study participant with a general ability score of 30 at age 11. The intercept (or constant) is 27.47 and this is the predicted value of BMI at age 42 when ‘general ability’ equals zero.
In the next section, we will look at how we can plot our results.
The Learning Hub is a resource for students and educators
tel | +44 (0)20 7331 5102 |
---|---|
closer@ucl.ac.uk |
Sign up for our email newsletters to get the latest from CLOSER
Sign up