Using Stata for Survey Data Analysis
Download 1.39 Mb. Pdf ko'rish
|
2009 Usingstataforsurveydataanalysis (1)
Minot
Using Stata for Survey Analysis Page 42 Two files before append One file after append hhid crop area quant value hhid crop area quant value 101 1 101 1 101 4 101 4 102 1 102 1 102 7 102 7 103 2 103 2 ══► 101 16 hhid crop area quant value 102 12 101 16 102 13 102 12 103 11 102 13 103 16 103 11 103 19 103 16 103 19 The syntax for this command is: append using filename where filename is the name of the file to be added to the current data set. This command is similar to “join files” in SPSS. None of the sample files from the BLSS need to be appended, but here are several situations where you might need to append files: The housing data from a survey were entered by three different people, each creating a separate file. You can use append to put them into one housing file with the following commands: use housing1, clear append using housing2 append using housing2 You have 20 files, each containing the crop data for one of the dzongkhags. You can use append to combine them into one file. A survey has crop production data for annual food crops, annual industrial crops, and tree crops in three files. You can use append to combine the three files into one crop file. In all three cases, the different files to be combined must have different observations but the same variables. fillin This command inserts additional records into a file so that all combinations of two or more variables are in the file. Again, it is easier to give an example than to describe it. Suppose we are working with the food expenditure data. Data are collected on different food categories, but most households do not consume all of them and records exist only for foods consumed by the household (this is how the BLSS food expenditure data are organized). In the database below, there are five food categories but each household only consumes 2-3 of them. |
Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling
ma'muriyatiga murojaat qiling