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

 

If I want to make sure about the linearity assumption

Does the relationship between categorical variable and y in any model should be nonlinear as it always has the same trend. how can the other plots help me to determine the relationship and if I need any specific type of transformation 

 

1.png2.png3.png

1 ACCEPTED SOLUTION

Accepted Solutions
PaigeMiller
Diamond | Level 26

Honestly, @shahd, I think you are headed down the wrong path here. I think you are asking meaningless questions. There is no such thing as linearity in the case where you have a categorical X variable.

 

--
Paige Miller

View solution in original post

6 REPLIES 6
Community_Guide
SAS Moderator

Hello @shahd,


Your question requires more details before experts can help. Can you revise your question to include more information? 

 

Review this checklist:

  • Specify a meaningful subject line for your topic.  Avoid generic subjects like "need help," "SAS query," or "urgent."
  • When appropriate, provide sample data in text or DATA step format.  See this article for one method you can use.
  • If you're encountering an error in SAS, include the SAS log or a screenshot of the error condition. Use the Photos button to include the image in your message.
    use_buttons.png
  • It also helps to include an example (table or picture) of the result that you're trying to achieve.

To edit your original message, select the "blue gear" icon at the top of the message and select Edit Message.  From there you can adjust the title and add more details to the body of the message.  Or, simply reply to this message with any additional information you can supply.

 

edit_post.png

SAS experts are eager to help -- help them by providing as much detail as you can.

 

This prewritten response was triggered for you by fellow SAS Support Communities member @PGStats

.
PaigeMiller
Diamond | Level 26

If you ask me, the idea of fitting a straight line (or any line) to your data is completely off target and wrong. You have categorical X, you want to fit an appropriate model for categorical X, which could be PROC GLM where X is in the CLASS statement.

--
Paige Miller
shahd
Quartz | Level 8

for my understanding, the GLM for categorical y variable. Here x is the categorical I am looking to check the linearity between x and y here. Could you please advise with this

PaigeMiller
Diamond | Level 26

From your plots, the categorical variable is the X variable.

 

There is no such thing as linearity with a categorical X variable.

--
Paige Miller
shahd
Quartz | Level 8
I need to decide if this relationship between x and y is linear or non-linear so if its non-linear I need to transform the x
PaigeMiller
Diamond | Level 26

Honestly, @shahd, I think you are headed down the wrong path here. I think you are asking meaningless questions. There is no such thing as linearity in the case where you have a categorical X variable.

 

--
Paige Miller

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 6 replies
  • 1320 views
  • 0 likes
  • 3 in conversation