Turn on suggestions

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

Showing results for

- Home
- /
- Programming
- /
- SAS Procedures
- /
- Proc GAMPL - what is default distribution and link function?

Options

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

🔒 This topic is **solved** and **locked**.
Need further help from the community? Please
sign in and ask a **new** question.

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

Posted 01-11-2022 08:31 AM
(1663 views)

Hello SAS community,

I am starting to use Proc GAMPL (SAS version 9) for some time series analyses.

The response I am using is a continuous variable (e. g., sizes or abundances of an animal caught in the field).

What is the default distribution and link used if neither of these are specified on the Model statement line? I cannot find this information in the Proc GAMPL description.

Thank you.

1 ACCEPTED SOLUTION

Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

I don't see it either, but you can easily test what I think it is. I assume the distribution is normal and the link is the identity link. Try running these two versions (based on the first example in the PROC GAMPL documentation - the lidar dataset is in C:\Program Files\SASHome94\SASFoundation\9.4\hpstat\sample\hpgamex1.sas if you are working from a Windows install):

proc gampl data=Lidar seed=12345;

model LogRatio = spline(Range/details)/dist=normal link=identity;

output out=LidarOut2 pred=p;

run;

proc compare base=lidarout comp=lidarout2;

run;

If PROC COMPARE doesn't detect any differences in the two output datasets, it seems likely that the default is normal/identity. If there are trivial differences, that is still likely the case. If there are major differences, then try some logical choices for the link= option.

SteveDenham

8 REPLIES 8

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

I don't see it either, but you can easily test what I think it is. I assume the distribution is normal and the link is the identity link. Try running these two versions (based on the first example in the PROC GAMPL documentation - the lidar dataset is in C:\Program Files\SASHome94\SASFoundation\9.4\hpstat\sample\hpgamex1.sas if you are working from a Windows install):

proc gampl data=Lidar seed=12345;

model LogRatio = spline(Range/details)/dist=normal link=identity;

output out=LidarOut2 pred=p;

run;

proc compare base=lidarout comp=lidarout2;

run;

If PROC COMPARE doesn't detect any differences in the two output datasets, it seems likely that the default is normal/identity. If there are trivial differences, that is still likely the case. If there are major differences, then try some logical choices for the link= option.

SteveDenham

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

Hello SteveDenham,

Thank you and the other community members for very helpful replies and suggestions. This is a good idea to try the analysis as you suggest and compare results.

I did notice when runnning the GAMPL Procedure that part of the output includes a table called “Model Information”. The table states what the distribution and link function are, along with listing some other information. And indeed, the defaults are “normal” and “identity”. 🙂

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

Hello @bmac1,

I agree with @SteveDenham (who has replied faster): It appears that DIST=NORMAL (and LINK=IDENTITY) is the default. At least that is what I get for each of the four examples in the documentation (omitting the DIST= option) and it also seems plausible. The section "Model Information" of the procedure output contains this information when you have run a PROC GAMPL step.

I think it's an unusual omission in the MODEL statement documentation (also for PROC GAM). The default *link function* for each distribution can be found in Table 8 on that documentation page.

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

Thank you !

Yes, I also saw it in the Model Information table of the Proc output.

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

Hello,

I had a look at the SAS documentation

for the CAS procedure GAMMOD and

for its corresponding MVA counterparts GAM & GAMPL.

PROC GAM (The GAM Procedure) has this in its Details drop-down :**Distribution Family and Canonical Link**

... and there it is written :

The Gaussian Model

For a Gaussian model, the link function is the identity function, and the generalized additive model is the same as the additive model. __ The Gaussian model is selected by default__ or when you specify the DIST=GAUSSIAN option in the MODEL statement.

But I see no similar details section for the GAMPL procedure, neither for GAMMOD.

If you find a shortcoming in the documentation, please use the feedback button in the top-right corner and mention this.

Thanks,

Koen

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

In general, the normal distribution with identity link is the default for all generalized linear model regression procedures that support a variety of distributions and links. This is true for most statistical software, not only SAS.

However, that does not excuse the doc from omitting that information. I am glad Koen found an instance in the doc that confirms everyone's assumptions.

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

Hi Rick_SAS,

Thank you! Yes, it is normal and identity. I found it also in the Model Information table of the Proc's output, as well.

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

Hi Koen,

Yes, thank you for the helpful reply! I also noticed the default distribution and link information is in fact presented in the Model Information table of the GAMPL output too.

**SAS Innovate 2025** is scheduled for May 6-9 in Orlando, FL. Sign up to be **first to learn** about the agenda and registration!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

Ready to level-up your skills? Choose your own adventure.