Dear StataList.
As I'm new to STATA and haven't used any commands (mainly been copy-pasting from Excel to STATA), then I am looking for a way to make some automatic data validation of my data.
When copying from one source to another a "," or "." could get misplaced, and make a value such as -1.4652 to -14652 - hence I'm looking for a way to loop through all my data and check for values over/under X-value.
Pseudo-code in Python:
for rows in data:
for cell in rows:
if cell > X:
print "this value is probably wrong"
Same with columns of course, but you get the picture.
How would I go about this?
Thanks in advance.
- Martin.
As I'm new to STATA and haven't used any commands (mainly been copy-pasting from Excel to STATA), then I am looking for a way to make some automatic data validation of my data.
When copying from one source to another a "," or "." could get misplaced, and make a value such as -1.4652 to -14652 - hence I'm looking for a way to loop through all my data and check for values over/under X-value.
Pseudo-code in Python:
for rows in data:
for cell in rows:
if cell > X:
print "this value is probably wrong"
Same with columns of course, but you get the picture.
How would I go about this?
Thanks in advance.
- Martin.
Comment