Programming the statistical procedures from SAS

Model Statement in Proc Logistic

Accepted Solution Solved
Reply
New Contributor
Posts: 2
Accepted Solution

Model Statement in Proc Logistic

Hello,

I have a question regarding the model statement syntax in proc logistic. I read that the below two model statements are equivalent.

1. Mode1 Purchase * Gender Age Region;

2. Mode1 Purchase * Gender|Age|Region @1;

I have never seen such model statements ever before. My questions are

1. Can we use asterisk to separate the dependent from independent variables?

2. What is the @1 doing in the 2nd option above?

3. How are these two statements equivalent?


Accepted Solutions
Solution
‎01-18-2015 01:41 PM
Grand Advisor
Posts: 16,889

Re: Model Statement in Proc Logistic

1. No. The asterisk is used to denote interaction terms rather than a single term.

2. The bars | separating the variables tell SAS to consider interaction between those variables, but the @1 says to only consider single level so no interaction. If it was @2 then it would consider all 2 level interactions (Gender*Age Gender*Region Age*Region etc) between the variables. 

3. I don't think they're equivalent. 

View solution in original post


All Replies
Solution
‎01-18-2015 01:41 PM
Grand Advisor
Posts: 16,889

Re: Model Statement in Proc Logistic

1. No. The asterisk is used to denote interaction terms rather than a single term.

2. The bars | separating the variables tell SAS to consider interaction between those variables, but the @1 says to only consider single level so no interaction. If it was @2 then it would consider all 2 level interactions (Gender*Age Gender*Region Age*Region etc) between the variables. 

3. I don't think they're equivalent. 

☑ This topic is SOLVED.

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

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