The HPNLMOD Procedure

Built-In Log-Likelihood Functions

For models in which the distribution of model errors is specified, the HPNLMOD procedure estimates parameters by maximizing the value of a log-likelihood function for the specified distribution. The log-likelihood functions used by PROC HPNLMOD for the supported error distributions are as follows:

upper Y tilde normal n normal o normal r normal m normal a normal l left-parenthesis m comma v right-parenthesis
StartLayout 1st Row 1st Column l left-parenthesis m comma v semicolon y right-parenthesis 2nd Column equals minus one-half left-parenthesis log left-brace 2 pi right-brace plus StartFraction left-parenthesis y minus m right-parenthesis squared Over v EndFraction plus log left-brace v right-brace right-parenthesis 2nd Row 1st Column normal upper E left-bracket upper Y right-bracket 2nd Column equals m 3rd Row 1st Column normal upper V normal a normal r left-bracket upper Y right-bracket 2nd Column equals v 4th Row 1st Column v 2nd Column greater-than 0 EndLayout
upper Y tilde normal b normal i normal n normal a normal r normal y left-parenthesis p right-parenthesis
StartLayout 1st Row 1st Column l 1 left-parenthesis p semicolon y right-parenthesis 2nd Column equals StartLayout Enlarged left-brace 1st Row 1st Column y log left-brace p right-brace 2nd Column y greater-than 0 2nd Row 1st Column 0 2nd Column normal o normal t normal h normal e normal r normal w normal i normal s normal e EndLayout 2nd Row 1st Column l 2 left-parenthesis p semicolon y right-parenthesis 2nd Column equals StartLayout Enlarged left-brace 1st Row 1st Column left-parenthesis 1 minus y right-parenthesis log left-brace 1 minus p right-brace 2nd Column y less-than 1 2nd Row 1st Column 0 2nd Column normal o normal t normal h normal e normal r normal w normal i normal s normal e EndLayout 3rd Row 1st Column l left-parenthesis p semicolon y right-parenthesis 2nd Column equals l 1 left-parenthesis p semicolon y right-parenthesis plus l 2 left-parenthesis p semicolon y right-parenthesis 4th Row 1st Column normal upper E left-bracket upper Y right-bracket 2nd Column equals p 5th Row 1st Column normal upper V normal a normal r left-bracket upper Y right-bracket 2nd Column equals p left-parenthesis 1 minus p right-parenthesis 6th Row 1st Column 0 2nd Column less-than p less-than 1 EndLayout
upper Y tilde normal b normal i normal n normal o normal m normal i normal a normal l left-parenthesis n comma p right-parenthesis
StartLayout 1st Row 1st Column l Subscript c 2nd Column equals log left-brace normal upper Gamma left-parenthesis n plus 1 right-parenthesis right-brace minus log left-brace normal upper Gamma left-parenthesis y plus 1 right-parenthesis right-brace minus log left-brace normal upper Gamma left-parenthesis n minus y plus 1 right-parenthesis right-brace 2nd Row 1st Column l 1 left-parenthesis n comma p semicolon y right-parenthesis 2nd Column equals StartLayout Enlarged left-brace 1st Row 1st Column y log left-brace p right-brace 2nd Column y greater-than 0 2nd Row 1st Column 0 2nd Column normal o normal t normal h normal e normal r normal w normal i normal s normal e EndLayout 3rd Row 1st Column l 2 left-parenthesis n comma p semicolon y right-parenthesis 2nd Column equals StartLayout Enlarged left-brace 1st Row 1st Column left-parenthesis n minus y right-parenthesis log left-brace 1 minus p right-brace 2nd Column n minus y greater-than 0 2nd Row 1st Column 0 2nd Column normal o normal t normal h normal e normal r normal w normal i normal s normal e EndLayout 4th Row 1st Column l left-parenthesis n comma p semicolon y right-parenthesis 2nd Column equals l Subscript c Baseline plus l 1 left-parenthesis n comma p semicolon y right-parenthesis plus l 2 left-parenthesis n comma p semicolon y right-parenthesis 5th Row 1st Column normal upper E left-bracket upper Y right-bracket 2nd Column equals n p 6th Row 1st Column normal upper V normal a normal r left-bracket upper Y right-bracket 2nd Column equals n p left-parenthesis 1 minus p right-parenthesis 7th Row 1st Column 0 2nd Column less-than p less-than 1 EndLayout
upper Y tilde normal g normal a normal m normal m normal a left-parenthesis a comma b right-parenthesis
StartLayout 1st Row 1st Column l left-parenthesis a comma b semicolon y right-parenthesis 2nd Column equals minus a log left-brace b right-brace minus log left-brace normal upper Gamma left-parenthesis a right-parenthesis right-brace plus left-parenthesis a minus 1 right-parenthesis log left-brace y right-brace minus y slash b 2nd Row 1st Column normal upper E left-bracket upper Y right-bracket 2nd Column equals a b 3rd Row 1st Column normal upper V normal a normal r left-bracket upper Y right-bracket 2nd Column equals a b squared 4th Row 1st Column a 2nd Column greater-than 0 5th Row 1st Column b 2nd Column greater-than 0 EndLayout

This parameterization of the gamma distribution differs from the parameterization that the GLIMMIX and GENMOD procedures use. The scale parameter in PROC HPNLMOD is expressed as the inverse of the scale parameter that PROC GLIMMIX and PROC GENMOD use. The PROC HPNLMOD parameter represents the scale of the magnitude of the residuals. The scale parameter in PROC GLIMMIX can be estimated by using the following statements:

proc glimmix;
   model y = x / dist=gamma s;
run;

The following statements show how to use PROC HPNLMOD to estimate the equivalent scale parameter:

proc hpnlmod;
   parms b0=1 b1=0 scale=14;
   linp = b0 + b1*x;
   mu   = exp(linp);
   b    = mu*scale;
   model y ~ gamma(1/scale,b);
run;
upper Y tilde normal n normal e normal g normal b normal i normal n left-parenthesis n comma p right-parenthesis
StartLayout 1st Row 1st Column l left-parenthesis n comma p semicolon y right-parenthesis 2nd Column equals log left-brace normal upper Gamma left-parenthesis n plus y right-parenthesis right-brace minus log left-brace normal upper Gamma left-parenthesis n right-parenthesis right-brace minus log left-brace normal upper Gamma left-parenthesis y plus 1 right-parenthesis right-brace 2nd Row 1st Column Blank 2nd Column plus n log left-brace p right-brace plus y log left-brace 1 minus p right-brace 3rd Row 1st Column normal upper E left-bracket upper Y right-bracket 2nd Column equals n left-parenthesis StartFraction 1 minus p Over p EndFraction right-parenthesis 4th Row 1st Column normal upper V normal a normal r left-bracket upper Y right-bracket 2nd Column equals n left-parenthesis StartFraction 1 minus p Over p squared EndFraction right-parenthesis 5th Row 1st Column n 2nd Column greater-than-or-equal-to 0 6th Row 1st Column 0 2nd Column less-than p less-than 1 EndLayout

The parameter n can be real-numbered; it does not have to be integer-valued.

upper Y tilde normal upper P normal o normal i normal s normal s normal o normal n left-parenthesis m right-parenthesis
StartLayout 1st Row 1st Column l left-parenthesis m semicolon y right-parenthesis 2nd Column equals y log left-brace m right-brace minus m minus log left-brace normal upper Gamma left-parenthesis y plus 1 right-parenthesis right-brace 2nd Row 1st Column normal upper E left-bracket upper Y right-bracket 2nd Column equals m 3rd Row 1st Column normal upper V normal a normal r left-bracket upper Y right-bracket 2nd Column equals m 4th Row 1st Column m 2nd Column greater-than 0 EndLayout
Last updated: December 09, 2022