BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Maicon
Calcite | Level 5

I'm having an issue when programming SAS to use Dunnet test: instead of use the treatment "-1" as reference for dunnet test, it is using the treatment "0". So it is comparing treatment "0" with each other treatment. Please, see the attachment with the SAS code and result. What can I do to make SAS use the treatment "-1" as reference?

 

In addition, the same are occurring in the contrast analysis: instead consider treatments 0, 1000, 2000, and 3000 excluding the treatment "-1", it is performing the contrast using "-1, 1000, 2000, and 3000" and excluding the treatment "0". 

 

The treatment -1 means a control treatment and did not macth with the other treatment levels. Such code programming usually work, but now I'm using SAS online and it did not work in the same way.

 

Thanks in advance.


SAS doubt.png
1 ACCEPTED SOLUTION

Accepted Solutions
Reeza
Super User

Don't post your code as an image, use the icons in the forum to insert your code.

 

You need to modify your CLASS staement. You can set the reference level to first or last. If the level you need is not one of these, then you need to recode your data such that it is. 

 

http://support.sas.com/documentation/cdl/en/statug/68162/HTML/default/viewer.htm#statug_mixed_syntax...

 


@Maicon wrote:

I'm having an issue when programming SAS to use Dunnet test: instead of use the treatment "-1" as reference for dunnet test, it is using the treatment "0". So it is comparing treatment "0" with each other treatment. Please, see the attachment with the SAS code and result. What can I do to make SAS use the treatment "-1" as reference?

 

In addition, the same are occurring in the contrast analysis: instead consider treatments 0, 1000, 2000, and 3000 excluding the treatment "-1", it is performing the contrast using "-1, 1000, 2000, and 3000" and excluding the treatment "0". 

 

The treatment -1 means a control treatment and did not macth with the other treatment levels. Such code programming usually work, but now I'm using SAS online and it did not work in the same way.

 

Thanks in advance.


 

View solution in original post

1 REPLY 1
Reeza
Super User

Don't post your code as an image, use the icons in the forum to insert your code.

 

You need to modify your CLASS staement. You can set the reference level to first or last. If the level you need is not one of these, then you need to recode your data such that it is. 

 

http://support.sas.com/documentation/cdl/en/statug/68162/HTML/default/viewer.htm#statug_mixed_syntax...

 


@Maicon wrote:

I'm having an issue when programming SAS to use Dunnet test: instead of use the treatment "-1" as reference for dunnet test, it is using the treatment "0". So it is comparing treatment "0" with each other treatment. Please, see the attachment with the SAS code and result. What can I do to make SAS use the treatment "-1" as reference?

 

In addition, the same are occurring in the contrast analysis: instead consider treatments 0, 1000, 2000, and 3000 excluding the treatment "-1", it is performing the contrast using "-1, 1000, 2000, and 3000" and excluding the treatment "0". 

 

The treatment -1 means a control treatment and did not macth with the other treatment levels. Such code programming usually work, but now I'm using SAS online and it did not work in the same way.

 

Thanks in advance.


 

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 1 reply
  • 1002 views
  • 0 likes
  • 2 in conversation