|
|
|
||||
|
Help the Stat Consulting Group by
giving a gift
| |||||
|
Loading
|
|||||
Let's illustrate use of the nmissing and npresent commands using the high school and beyond data file we use in our Stata Classes.
The nmissing command shows us that one of the variables, science, has missing data, and it has 5 missing values. By contrast, the npresent command shows us the number of non-missing values for all of the variables in our data file. From this, we see all of the variables have 200 non-missing observations, except for science that has 195 non-missing observations.use http://www.ats.ucla.edu/stat/stata/notes/hsb1, clear (highschool and beyond (200 cases))
nmissing science 5 npresent id 200 gender 200 race 200 ses 200 schtyp 200 prog 200 read 200 write 200 math 200 science 195 socst 200
UCLA Researchers are invited to our Statistical Consulting Services
We recommend others to our list of Other Resources for Statistical Computing Help
These pages are Copyrighted (c) by UCLA Academic Technology Services