Monday, December 12, 2011

Thursday, November 3, 2011

Merging files

http://www.ssc.wisc.edu/sscc/pubs/sfr-combine.htm

The above explains things like for many-to one merge , which file is using data set?

"Next add information about teachers. In teachers.dta each observation represents a teacher, and each teacher has many students. That makes this a many-to-one merge (since the many students are currently in memory and the one teacher is in the using data set)."

Wednesday, September 14, 2011

Using pweights

Stata has a special weight, pweight, to specify probability weights. Probability weights are another name for sampling weights. The pweight command causes Stata to use the sampling weight as the number of subjects in the population that each observation represents when computing estimates such as proportions, means and regressions parameters.( source: http://www.cpc.unc.edu/research/tools/data_analysis/statatutorial/sample_surveys/weight_syntax)

e.g if u have a census which is a 10% random sample . Then every observation represents 10 people. so that the probability /sample weight is 10. and you will type: [pweight= 10] in Stata.