In this tiny example, house is the
household, eth is the ethnicity, and wt is the weighting
for the person. You can use the svyset commands to tell Stata about
these things and it remembers them. If you save the data file, Stata remembers them
with the data file and you don't even need to enter them the next time you use
the data file. Below, we tell Stata that the psu (primary sampling
unit) is the household (house). Further, the sampling scheme
included stratified sampling (strata) based on ethnicity (eth).
Finally, the weighting variable (pweight) is called wt.

The way the svyset command is constructed is different between Stata
version 7, 8 and 9. If you are not using Stata 9, the syntax below
will not work. Please see this page
for examples. An example is
given below. Notice that the PSU variable is given before the p-weight,
which is given in square brackets.

svyset house [pweight = wt], strata(eth)

Once Stata knows about the survey via the svyset
commands, you can use the svy: prefix using syntax which is quite
similar to the non-survey versions of the commands. For example, the svy: regress
command below looks just like a regular regress command, but it uses the
information you have provided about the survey design and does the computations taking
those into consideration.

svy: regress y x1 x2 x3

The output is below, and it tells you the pweight,
strata, and psu variables so you can confirm the right
variables have been chosen.