turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

Find a Community

- Home
- /
- SAS Programming
- /
- SAS Procedures
- /
- Error in SAS documentation of syntax for shared es...

Topic Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

02-27-2014 03:53 PM

Has anyone ever noticed that there is an obvious error in the documentation for 9.22 on the page with the title, "Positional and Nonpositional Syntax for Coefficients in Linear Functions?"

Actually, I think there are two errors on the page, but I am less certain about the second one.

The documentation asserts that if factor *A* has three levels and factor *B* has two levels, then these two procedure calls are equivalent:

proc logistic;

class a b;

model y= a b a*b;

estimate 'B at A2' b 1 -1 a*b 0 0 1 -1;

run;

proc logistic;

class b a;

model y=a b a*b;

estimate 'B at A2' b 1 -1 a*b 0 1 0 0 -1;

run;

This cannot be correct since there are 4 numbers after a*b in the first example but 5 in the second. I suspect that one of the 0's needs to be removed. Confirmation?

The second suspicious thing on the page is that the "nonpositional" syntax changes depending on the position of a and b on the class statement. In what sense would such a syntax be nonpositional?

I think that in both instances, the correct nonpositional syntax is

estimate 'B at A2' b 1 -1 a*b [1 2 1] [-1 2 2];

Confirmation?

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

Posted in reply to polarjud

02-27-2014 04:33 PM

Well, I just tested the code. Should have done that first. It does work. So I guess my questions are:

1) Why in the positional syntax are 5 values needed if *B* is listed first and just 4 if *A* is listed first?

2) Why does the nonpositional syntax depend on position?

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

Posted in reply to polarjud

02-27-2014 04:39 PM

What version of SAS are you on?

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

Posted in reply to Reeza

02-27-2014 04:45 PM

9.3 TS Level 1M1

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

Posted in reply to polarjud

02-27-2014 04:53 PM

I figured out the first question. With the positional syntax, there should be 6 coefficients, but SAS assumes that if you name less than 6 then however many at the end are missing, they are all put =0. Would be really nice if the documentation of this was improved.

So

0 0 1 -1

is the same as

0 0 1 -1 0 0

and

0 1 0 0 -1

is the same as

0 1 0 0 -1 0