I'm working with data from ICPSR for which a do
file was written in Stata V7, around 2001. The do
file notes that the program only runs in Version 7 (which is true). I'm having issues understanding parts of the code and I'm wondering if any of you more knowledgeable folks can help.
Here's an example block of the code:
program drop _all;
program define impact1;
scalar drop _all;
*First define proportions in your sample;
qui reg svy_cmove [pweight=`8'] if `1'~=. & t_exp_vs_ph==1;
scalar define ptmove=_b[_cons];
qui reg svy_cmove [pweight=`8'] if `1'~=. & t_s8_vs_ph==1;
scalar define ps8move=_b[_cons];
qui reg `6' [pweight=`8'] if `1'~=.;
scalar define tprop=_b[_cons];
qui reg `7' [pweight=`8'] if `1'~=.;
scalar defin s8prop=_b[_cons];
*Need to svyset data to specify weight;
svyset pweight `8' ;
The code runs fine and performs what it is supposed to (replication of a table from a study), but what I don't understand is what the numbered references mean, for instance,
pweight= `8'
It refers to a total weight used in the survey, but I don't know how Stata makes the connection between the reference
`8'
and the proper weight variable. Note that it is NOT defined at any point earlier in the do file. The code uses these references throughout the file when it runs a series of regressions to replicate the tables produced by the research team.
Any insight into how this process operates would be helpful so I can understand how Stata makes the connection between the variable and the number.
version 7
(if that is implied here) means thatversion 7
of Stata (or greater) is required, not that it will run only in version 7.