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

Hello,

I am working on repeated logistic regression using proc genmode. In the model, I used interaction term. In the result file, I am able to make  the following lists for the file using this code:

data parameter1;
set CpG;
if Parm = "Intercept" then delete;
if Parm = "MO_SPT_12m" then delete;
if Parm = "gender" then delete;
if Parm = "p0_sesc_5_r" then delete;
if Parm = "P10_Q5BirthWeight" then delete;
if Parm = "P10_Q5BirthWeight" then delete;
if Parm = "Time" then delete;
run;

rcg00026290
rcg00026290*Time
rcg00041989
rcg00041989*Time
rcg00085123
rcg00085123*Time
rcg00119811
rcg00119811*Time
rcg00281977
rcg00281977*Time

 But I need the values with interaction only. Is there any code that will delete the values without interaction term?

Thanks.

1 ACCEPTED SOLUTION

Accepted Solutions
Tom
Super User Tom
Super User

Do you mean you want to keep the values that have an * in them?

data parameter1;
  set CpG;
  if index(parm,'*');
run;

View solution in original post

2 REPLIES 2
Tom
Super User Tom
Super User

Do you mean you want to keep the values that have an * in them?

data parameter1;
  set CpG;
  if index(parm,'*');
run;
NahidSultanakmc
Calcite | Level 5

Thank you very much! It's exactly what I needed.

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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
  • 2 replies
  • 410 views
  • 0 likes
  • 2 in conversation