Estimates profile likelihood confidence intervals of parameters in a linear or generalized linear model (V.M. Cave).

### Options

`PRINT` = string token |
Controls printed output (`intervals` ); default `inte` |

`PLOT` = string tokens |
What to plot (`profiles` , `intervals` ); default * i.e. no plots |

`DECIMALS` = scalar |
Number of decimal places for printing |

`CIPROBABILITY` = scalar |
Probability for the confidence intervals; default 0.95 |

`RANGE` = scalar, variate or matrix |
Defines the range of values over which to evaluate a parameter’s profile likelihood; default 3 |

`NPOINTS` = scalar |
Defines the number of values at which to evaluate a parameter’s profile likelihood initially; default 10 |

`NEXTRAPOINTS` = scalar |
Defines the number of extra values to evaluate the profile likelihoods at, within the neighbourhoods of the confidence limits identified during the initial scan as defined by `RANGE` and `NPOINTS` ; default 10 |

`SAVE` = regression save structure |
Regression save structure to provide the information on the regression model; default * uses the most recently fitted regression model |

### Parameters

`TERMS` = formula |
Model terms for which profile likelihood confidence intervals of their parameters are to be estimated; if unset, intervals are produced for all parameters in the model |

`CISAVE` = pointer |
Pointer that saves the lower and upper limits of the profile likelihood intervals, along with the parameter estimates and a label identifying the parameters |

### Description

`RPLCONFIDENCE`

estimates profile likelihood confidence intervals for parameters in a linear or generalized linear model. The model must have been fitted already using the regression commands `MODEL`

and `FIT`

in the usual way. By default, the confidence intervals are produced for the most recent regression analysis. However, you can use the `SAVE`

option to specify the save structure from another regression analysis (see the `SAVE`

option of `MODEL`

).

By default, `RPLCONFIDENCE`

produces profile likelihood confidence intervals for all parameters in the model. However, you can use the `TERMS`

parameter to request confidence intervals for just the parameters associated with a specific set of model terms. The confidence interval for the constant (if included in the model) is produced by setting `TERMS`

`='constant'`

.

The probability for the confidence intervals is specified by the `CIPROBABILITY`

option; the default 0.95 gives 95% confidence intervals.

To estimate the profile likelihood confidence interval of a parameter, `RPLCONFIDENCE`

refits the model with the parameter fixed at a given value, and then computes the change in deviance between this model and the one where the parameter has been estimated as per normal. This process is repeated across a range of values for the parameter, aimed to be broad enough to include its lower and upper confidence limits. These changes in deviance are then compared to the critical value for the `CIPROBABILITY`

× 100th percentile of the chi-square distribution on 1 degree of freedom, and the confidence limits are estimated by interpolating between the fixed values for the parameter that resulted in deviance changes closest to this critical value. The procedure uses the `INTERPOLATE`

directive to perform cubic interpolation, or linear interpolation if cubic interpolation is not possible.

The range of values over which `RPLCONFIDENCE`

evaluates the profile likelihood of a parameter is defined by the option `RANGE`

, in either a scalar, variate or matrix. If a scalar is supplied, this specifies a multiplier of the standard error of the parameter estimate, and points are evaluated at this multiple of the standard error, in both the positive and negative directions from the parameter estimate. Alternatively, if a variate is supplied, it must have two values, specifying the deviations in the negative and positive directions from the parameter estimate, respectively. Finally, if a matrix is supplied, it must have two columns and the same number of rows as confidence intervals being constructed. The value in the first column of the *i*th row specifies the deviation in the negative direction from parameter estimate *i* and the value in the second column of the *i*th row specifies the deviation in the positive direction from parameter estimate *i*. The default of three evaluates the profile likelihood at points ranging to three times the standard error of the parameter estimate in both the negative and positive directions. In general, this default works well, however for very skewed or flat profile likelihoods, a more appropriate `RANGE`

will need to be specified.

The `NPOINTS`

option specifies the number of points where the profile likelihood is evaluated initially, in both the negative and positive directions from the parameter estimate. The default is 10. That is, 10 evenly spaced values between the lower bound defined by `RANGE`

, up to (but not including) the parameter estimate, are evaluated in order to estimate the lower limit of the confidence interval. Similarly, 10 evenly spaced values between the upper bound defined by `RANGE`

, down to (but not including) the parameter estimate, are evaluated in order to estimate the upper limit of the confidence interval.

To get more accurate estimates of the confidence limits, a finer search of the profile likelihood can be performed by setting the option `NEXTRAPOINTS`

to an integer greater than 0. The profile likelihood at `NEXTRAPOINTS`

is then evaluated around the neighbourhoods of both the lower and upper confidence limits identified during the initial search (as defined by `RANGE`

and `NPOINTS`

). For example, if the initial search identified that the lower limit was located between the values of 1 and 3, `NEXTRAPOINTS=4`

would result in the profile likelihood being further evaluated at 1.4, 1.8, 2.2, 2.6. Setting `NEXTRAPOINTS=0`

means a finer scan is not performed; default 10.

Printed output is controlled by the `PRINT`

option. By default, `RPLCONFIDENCE`

prints the profile likelihood confidence intervals, but you can suppress this by setting option `PRINT=*`

. The number of decimals places to appear in the printed output can be set using the `DECIMALS`

option.

The `PLOT`

option allows you to request plots of the results, using the following settings.

`profiles`

for a plot of each parameter’s profile likelihood. Superimposed onto these plots are a horizontal reference line at the critical value (in red), vertical projections from the critical value to the estimated confidence limits (also in red) and a vertical reference line at the parameter estimate (green dotted). Blue crosses on the profile plot indicate fixed values for the parameter at which the regression model failed to successfully fit.

`intervals`

for a plot of the estimated profile likelihood confidence intervals. By default, no plots are produced.

The `CISAVE`

parameter can supply a pointer to store the results. The elements of the pointer are labelled as follows:

`'label'`

text structure storing labels to identify the parameters,

`'estimate'`

variate storing the parameter estimates,

`'lower'`

variate storing the lower limits of the profile likelihood intervals for the parameters,

`'upper'`

variate storing the upper limits of the profile likelihood intervals for the parameters.

The procedure accommodates most linear and generalized linear models defined by the `MODEL`

directive, except for models with a user defined (i.e. `calculated`

) `DISTRIBUTION`

or `LINK`

function, a multinomial distribution or an absorbing factor (i.e. when the `GROUPS`

option is used). In addition, although the model formula defined by the `FIT`

directive may include `POL`

, `REG`

and `COMPARISON`

functions, it must not include `SSPLINE`

functions.

Options: `PRINT`

, `PLOT`

, `DECIMALS`

, `CIPROBABILITY`

, `RANGE`

, `NPOINTS`

, `NEXTRAPOINTS`

, `SAVE`

Parameter: `TERMS`

, `CISAVE`

.

### See also

Directives: `MODEL`

, `FIT`

, `RDISPLAY`

.

Procedure: `BACKTRANSFORM`

, `RMPLCONFIDENCE`

.

Commands for: Regression analysis.

### Example

CAPTION 'RPLCONFIDENCE example'; STYLE=meta " Fit a linear regression model " SPLOAD '%Data%/Sulphur.gsh' CALCULATE LogSulphur = LOG10(Sulphur+0.5) MODEL LogSulphur FIT Windsp*Rain RPLCONFIDENCE [PLOT=profiles,intervals] " Fit a GLM - logistic regression" SPLOAD '%Data%/Drug.gsh' CALCULATE LogDose = LOG10(Dose) MODEL [DISTRIBUTION=binomial; LINK=Probit] R; NBINOMIAL=N FIT LogDose*Drug RPLCONFIDENCE [PLOT=profiles,intervals]