turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

Find a Community

- Home
- /
- SAS Programming
- /
- Base SAS Programming
- /
- What does this line mean?

Topic Options

- RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

10-26-2017 08:13 PM

```
data lab_valid (where=(troponin=1 & result_conv ne .& year>=2011));
set clean.lab_troponin
```

Specifically, I'm not sure what the "ne .&" means?

Thank you!

Accepted Solutions

Solution

10-26-2017
08:49 PM

- Mark as New
- Bookmark
- Subscribe
- RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to cdubs

10-26-2017 08:43 PM

Hi:

That WHERE option is a test for 3 things to be true in order for the observation to be selected. So separate out the & first, and replace it with the logical AND, then the option becomes:

where=( troponin=1 AND result_conv ne . AND year >= 2011)

So, an observation will only be selected if these 3 conditions are all true:

the variable TROPONIN must have a value equal to 1

the variable RESULT_CONV must have a value NOT equal to . (. means a MISSING value for a numeric variable)

the variable YEAR must have a value that is greated than or equal to 2011

With a SAS numeric variable a . is used to represent a missing value. For a character variable a space or blank is used to represent a missing value.

Hope this helps,

Cynthia

All Replies

- Mark as New
- Bookmark
- Subscribe
- RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to cdubs

10-26-2017 08:41 PM

The period is the most common type of missing value. Quite independently, ampersand means AND. The code would be clearer if there were a space between the two.

- Mark as New
- Bookmark
- Subscribe
- RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to WarrenKuhfeld

10-26-2017 08:49 PM

This works as a solution too! THANK YOU!!!!

Solution

10-26-2017
08:49 PM

- Mark as New
- Bookmark
- Subscribe
- RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to cdubs

10-26-2017 08:43 PM

Hi:

That WHERE option is a test for 3 things to be true in order for the observation to be selected. So separate out the & first, and replace it with the logical AND, then the option becomes:

where=( troponin=1 AND result_conv ne . AND year >= 2011)

So, an observation will only be selected if these 3 conditions are all true:

the variable TROPONIN must have a value equal to 1

the variable RESULT_CONV must have a value NOT equal to . (. means a MISSING value for a numeric variable)

the variable YEAR must have a value that is greated than or equal to 2011

With a SAS numeric variable a . is used to represent a missing value. For a character variable a space or blank is used to represent a missing value.

Hope this helps,

Cynthia

- Mark as New
- Bookmark
- Subscribe
- RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to Cynthia_sas

10-26-2017 08:49 PM

Thank you so much!