Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create Stata Testfile with special missing values #40

Open
mpahl opened this issue Sep 3, 2019 · 3 comments
Open

Create Stata Testfile with special missing values #40

mpahl opened this issue Sep 3, 2019 · 3 comments
Assignees

Comments

@mpahl
Copy link
Contributor

mpahl commented Sep 3, 2019

Create tests and testfiles with missingvalues "." and ".a"-".z".
See dmissingvalues

@mpahl
Copy link
Contributor Author

mpahl commented Sep 5, 2019

How it is:
TESTCAT = "-1 -1 .b 2 1 . 1 2 1 2 .b 1 1 2 2"
scale: cat
valid: labeled values (also negativ values)
invalid: stata missings

TESTSTRING = ". a b .a . c . .b . d e f f f g"
scale: str
valid: every string and stata missings with letters (.a - .z)
invalid: stata missings without letters (.)

TESTNUMBER = "3 .a -2 5 10 . 15 100 10 2 -1 3 4 5 6"
scale: num
valid: all positiv numbers
invalid: negativ number and stata missings

local TESTOTHER = "-1 a -2 5 b . 15 x 2 .a b 1 2 y z"
scale: str
valid and invalid like TESTSTRING, numbers are strings

@mpahl
Copy link
Contributor Author

mpahl commented Sep 5, 2019

"."-Missings are always invalid
".a-.z" aren't recognized as invalid for string variables
negativ numbers are valid for cat variables but invalid for num variables

How this should be handled?

@hansendx
Copy link
Collaborator

Strings in the form of ^\.[a-z]{0,1}$ should be recognized as invalid.
Numbers might be a problem. Maybe we could add a parameter to customize invalid values for different studies in the future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants