SAS Data Integration Studio, DataFlux Data Management Studio, SAS/ACCESS, SAS Data Loader for Hadoop and others

Changing the Ordering of Values within a Variable

Accepted Solution Solved
Reply
Contributor
Posts: 29
Accepted Solution

Changing the Ordering of Values within a Variable

Hi,

I am using ODS graphics to create a 'journal-ready' regression table in SAS. I have two different types of predictors that I am using, and therefore I am going to create a break in PROC REPORT between these two types. 'Effect' is my variable that contains each of my predictor variables, and I want to move one of my predictors higher up the list of predictors. Currently, my data looks like:

'Effect'                    'Estimate'                         'pvalue'

Intercept

Evangelical

...

Calls to Language

Language Problem

LRS

Calls to Refusal

...

I want to move 'LRS' to the position under intercept, and I want to keep everything else as is. How should I go about this?

Thanks,

Kevin


Accepted Solutions
Solution
‎08-04-2015 12:51 PM
Trusted Advisor
Posts: 1,128

Re: Changing the Ordering of Values within a Variable

One way to achieve the same is to create a numeric order variable with numbers for the respective effect in the order you want to display in the output. Use this numeric variable in the proc report to order the effect and you could place noprint in the define to prevent it from display in output. Hope it helps.

Thanks,

Jag

Thanks,
Jag

View solution in original post


All Replies
Respected Advisor
Posts: 3,777

Re: Changing the Ordering of Values within a Variable

You mention "type of predictor" but you don't mention a variable to define it.

Solution
‎08-04-2015 12:51 PM
Trusted Advisor
Posts: 1,128

Re: Changing the Ordering of Values within a Variable

One way to achieve the same is to create a numeric order variable with numbers for the respective effect in the order you want to display in the output. Use this numeric variable in the proc report to order the effect and you could place noprint in the define to prevent it from display in output. Hope it helps.

Thanks,

Jag

Thanks,
Jag
Contributor
Posts: 29

Re: Changing the Ordering of Values within a Variable

Thanks! This worked for me.

☑ This topic is SOLVED.

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

Discussion stats
  • 3 replies
  • 316 views
  • 0 likes
  • 3 in conversation