# profile.nlreg: Profile Method for 'nlreg' Objects In nlreg: Higher Order Inference for Nonlinear Heteroscedastic Models

## Description

Returns a list of elements for profiling a nonlinear heteroscedastic model.

## Usage

 1 2 3 4 ## S3 method for class 'nlreg' profile(fitted, offset = "all", hoa = TRUE, precision = 6, signif = 30, n = 50, omit = 0.5, trace = FALSE, md, vd, all = FALSE, ...) 

## Arguments

 fitted a fitted nlreg object such as returned by a call to nlreg. offset a single named element representing the parameter of interest (a regression coefficient or a variance parameter), or "all" if all parameters are to be profiled, provided that the model formula contains more than one regression coefficient. The constant term \code{log(s^2)} which is included by default in the variance function is referred to by logs (see the weights argument in nlreg). The default is "all". hoa logical value indicating whether higher order statistics should be included; the default is TRUE. precision numerical value defining the maximum range of values, given by MLE +/- precision*s.e., that are profiled. The default is 6. signif the maximum number of output points that are calculated exactly; the default is 30. n the approximate number of output points produced by the spline interpolation; the default is 50. omit numerical value defining the range of values, given by MLE +/- omit*s.e, which is omitted in the spline interpolation of the higher order statistics. The purpose is to avoid numerical instabilities around the maximum likelihood estimate. trace if TRUE, details of the iterations are printed. md a function definition that returns the first two derivatives of the mean function; used by allProfiles.nlreg. vd a function definition that returns the first two derivatives of the variance function; used by allProfiles.nlreg. all logical switch used by allProfiles.nlreg. ... absorbs any additional argument.

## Details

The function profile.nlreg calculates all elements necessary for profiling a scalar parameter of interest or all model parameters. The model formula must contain more than one regression coefficient.

A classical profile plot (Bates and Watts, 1988, Section 6.1.2) is a plot of the likelihood root statistic and of the Wald statistic against a range of values for the interest parameter. It provides a means to assess the accuracy of the normal approximation to the distribution of both statistics: the closer the corresponding curves are, the better the approximations. Confidence intervals can easily be read off for any desired level: the confidence bounds identify with the values on the x-axis at which the curves intersect the horizontal lines representing the standard normal quantiles of the desired level.

Profiling is performed by updating a fitted nonlinear heteroscedastic model. All statistics are calculated exactly for at maximum signif equally spaced points distributed around the MLE. To save execution time, the iterations start with a value close to the MLE and proceed in the two directions MLE +/- \emph{delta}, until the absolute value of all statistics exceeds the threshold 2.4. The step size \emph{delta} is defined by the signif argument. A spline interpolation is used to extend them over the whole interval of interest. A range of values, defined by the omit argument is omitted to avoid numerical instabilities around the MLE. All results are stored in an object of class nlreg.profile or all.nlreg.profiles depending on the value assumed by the offset argument. The summary and plot method functions must be used to examine the output or represent it graphically. No print method is available.

If hoa = TRUE, profile.nlreg produces an enhanced version of the classical profile plots by including the third order modified likelihood root statistic r*. More precisely, it implements two approximations to Barndorff-Nielsens's (1991) original formulation where the sample space derivatives are replaced by respectively the approximations proposed in Skovgaard (1996) and Fraser, Reid and Wu (1999). The idea is to provide insight into the behaviour of first order methods, such as detecting possible bias of the estimates or the influence of the model curvature.

The theory and statistics used are summarized in Brazzale (2000, Chapters 2 and 3). More details of the implementation are given in Brazzale (1999; 2000, Section 6.3.2).

## Value

a list of elements of class nlreg.profile or, if offset = "all", of class all.nlreg.profiles for profiling a nonlinear heteroscedastic model. The nlreg.profile class considers a scalar parameter of interest, while the all.nlreg.profiles class ontains the profiles of all parameters – regression coefficients and variance parameters.

## Side Effects

If trace = TRUE, the parameter which is currently profiled and the corresponding value are printed.

## Note

profile.nlreg is a method for the generic function profile for class nlreg. It can be invoked by calling profile for an object of the appropriate class, or directly by calling profile.nlreg.

To obtain the profiles of the different statistics considered, the model is refitted several times while keeping the value of the parameter of interest fixed. Although rarely, convergence problems may occur as the starting values are chosen in an automatic way. A try construct is used to prevent the profile.nlreg method from breaking down. Hence, the values of the statistics are not available where a convergence problem was encountered. A warning is issued whenever this occurs.

## References

Barndorff-Nielsen, O. E. (1991) Modified signed log likelihood ratio. Biometrika, 78, 557–564.

Bates, D. M. and Watts, D. G. (1988) Nonlinear Regression Analysis and Its Applications. New York: Wiley.

Brazzale, A. R. (2000) Practical Small-Sample Parametric Inference. Ph.D. Thesis N. 2230, Department of Mathematics, Swiss Federal Institute of Technology Lausanne.

Fraser, D.A.S., Reid, N. and Wu, J. (1999). A simple general formula for tail probabilities for frequentist and Bayesian inference. Biometrika, 86, 249–264.

Skovgaard, I. (1996) An explicit large-deviation approximation to one-parameter tests. Bernoulli, 2, 145–165.

nlreg.profile.object, all.nlreg.profiles.object, profile
  1 2 3 4 5 6 7 8 9 10 11 12 13 14 ## Not run: data(metsulfuron) metsulfuron.nl <- nlreg( formula = log(area) ~ log( b1+(b2-b1) / (1+(dose/b4)^b3) ), weights = ~ ( 1+dose^exp(g) )^2, data = metsulfuron, start = c(b1 = 138, b2 = 2470, b3 = 2, b4 = 0.07, g = log(0.3)), hoa = TRUE ) ## metsulfuron.prof <- profile( metsulfuron.nl, offset = g, trace = TRUE ) plot( metsulfuron.prof, lwd2 = 2 ) # metsulfuron.prof <- profile( metsulfuron.nl, trace = TRUE ) plot( metsulfuron.prof, nframe = c(2,3), lwd2 = 2 ) ## End(Not run)