Hello all,
I am very new to Stata and I am having some trouble using the Postfile function. I am following a do file that my lecturer has given me and when he runs the following code, a new stata file called 'resultsbeta' is generated for him. The results are shown in stata for me (as they are for the lecturer), but they are not stored in a new file.
Below is an attached an image of what the new file should look like (low quality unfortunately). 
Again, I am very new to stata so I apologise if I am overlooking something or if this is a very easy fix.
Thanks
I am very new to Stata and I am having some trouble using the Postfile function. I am following a do file that my lecturer has given me and when he runs the following code, a new stata file called 'resultsbeta' is generated for him. The results are shown in stata for me (as they are for the lecturer), but they are not stored in a new file.
Code:
tempname memhold postfile `memhold' beta_values str32 varname using "resultsbeta", replace // Loop over each variable in the list foreach var in `variable_list' { // Calculate the covariance between the current variable and return_ftse100priceindex corr `var' return_ftse100priceindex, cov scalar beta_values = r(C)[1, 2] / var_ftse post `memhold' (beta_values) (`"`var'"') } postclose `memhold'
Again, I am very new to stata so I apologise if I am overlooking something or if this is a very easy fix.
Thanks
Comment