This exercise is based on the cinema data previously used in the illustrations of linear regression in lectures. It walks you through a data-driven way, the so-called bootstrap procedure, to assess the sampling distribution of OLS estimates.
1. Estimate the coe±cients in the linear regression of log(price) on a constant and the number of fascias; i.e. reproduce the OLS regression results displayed in class.
2. Instead of collecting another sample (of size 112) of UK multiplex cinemas, consider re-sampling by means of the so-called bootstrap procedure: Obtain a bootstrap sample by re-sampling 112 data records (rows in the data matrix, i.e. pairs of log(price) and fascia count) from the original data, with replacement (i.e. there will be records in the bootstrap sample that appear more than once).
3. Use the bootstrap sample obtained in (2.) and re-estimate the coe±cients in the linear regression in (1.). The OLS coe±cient estimates obtained from this regression are called the bootstrap replicates of the original coe±cient estimates. Be sure to store them for later use.
4. Repeat steps (2.) and (3.) 99 times and thereby obtain a total of 100 bootstrap replications of the original OLS coefficient estimates.
5. Calculate the sample mean and variance-covariance matrix of your 100 bootstrap replications of the original OLS estimates. Verify that the sample means and standard deviations are approximately equal to the original OLS estimates and their standard errors.
想问一下第4步的重复2,3步99次的命令怎么写,是不是用loop命令?请高人指教,谢谢了。恳请写出具体的program。