Programming the statistical procedures from SAS

Array and Where statement in proc nlmixed

Accepted Solution Solved
Reply
Contributor
Posts: 65
Accepted Solution

Array and Where statement in proc nlmixed

Hi everyone;

Am working with 9.3 version. I just wonder if we could use where and array statements in proc nlmixed and if that's possible where to put them?

Thanks!

Issac


Accepted Solutions
Solution
‎08-20-2012 11:30 PM
Super User
Super User
Posts: 6,135

Re: Array and Where statement in proc nlmixed

The ARRAY statement is documented in the manual.  Note that it is different than the ARRAY statement in a data step.

What do you want the WHERE statement to do?  For most procedures that simply subset the data being read from the input dataset.

I would normally place it immediately after the PROC statement, but in many procedures it does not matter where it is placed. 

proc nlmixed data=mydata ... ;

where id > 1000 ;

...

run;

You can also code a WHERE condition using a data set option on the input file.

proc nlmixed data=mydata(where=(id > 1000)) ... ;

...

run;

View solution in original post


All Replies
Solution
‎08-20-2012 11:30 PM
Super User
Super User
Posts: 6,135

Re: Array and Where statement in proc nlmixed

The ARRAY statement is documented in the manual.  Note that it is different than the ARRAY statement in a data step.

What do you want the WHERE statement to do?  For most procedures that simply subset the data being read from the input dataset.

I would normally place it immediately after the PROC statement, but in many procedures it does not matter where it is placed. 

proc nlmixed data=mydata ... ;

where id > 1000 ;

...

run;

You can also code a WHERE condition using a data set option on the input file.

proc nlmixed data=mydata(where=(id > 1000)) ... ;

...

run;

Contributor
Posts: 65

Re: Array and Where statement in proc nlmixed

Tom;

By ARRAY I want to do some programming in the body of proc nlmixed, but I guess if I can do it in the data step, it cost much less time since it needs to be done one time. So I go better off switch to data step.

Also by means of WHERE I exactly want sub setting of data set being processed by nlmixed and not sure where to put it. But now I know.

Thanks so much Tom;

Issac  

☑ This topic is SOLVED.

Need further help from the community? Please ask a new question.

Discussion stats
  • 2 replies
  • 111 views
  • 0 likes
  • 2 in conversation