calc1Dprofiles: One and two-dimensional profiles, and surface plots

View source: R/calc1Dprofiles.R

calc1DprofilesR Documentation

One and two-dimensional profiles, and surface plots

Description

Assuming that calcPredictorOK and maximizeOK have been first run: calc1Dprofiles plots 1D profiles of a predicted likelihood surface for each of the parameters. Poor profiles mayresult when only local optima are found for some parameter values. The next function provides an improvement over this. calcProfileLR plots 2D profiles of the predicted response surface relative to its maximum for pairs of parameters. It also prots 1D profiles taking benefit of the computation effort for the 2D profiles. calc2D3Dplots plots the predicted response surface (no profile) in different ways depending on the number of parameters.

These functions have almost no arguments, as almost all control is through global controls. See in particular gridStepsNbr (for profile plots) and graphicPars in blackbox.options.

Usage

calc1Dprofiles(varNames=blackbox.getOption("spec1DProfiles"))
calcProfileLR(varNames=blackbox.getOption("fittedNames"),
              pairlist=list(),
              cleanResu="")
calc2D3Dplots(plotFile=NULL,pairlist=list())

Arguments

plotFile

If a character string, the name of the file where plots are written. Otherwise, plots are output to the screen.

varNames

A character vector specifying the names of predictor variables to be considered. For calc1Dprofiles (used in conjunction with the Migraine software), if the default argument is NULL, all variable canonical parameters plus some composite ones may be considered (see the source code for details).

pairlist

A list of character vectors. Each vector describes a pair of predictor variables. With the default value list(), a default non-empty list may be constructed when calc2D3Dplots or calcProfileLR is typically used in conjunction with the Migraine software (see the source code for details).

cleanResu

A connection, or a character string naming a file for some nicely formated output. If it is "" (the default), print to the standard output connection.

Details

If there is only one parameter, calc2D3Dplots plots the predicted response as function of this parameter

If there are two parameters, calc2D3Dplots plots the response surface both as a 2D surface plot and as a 3D perspective plot, and calcProfileLR also produces a plot of the response surface (no profiling is needed) relative to its maximum (hence, a likelihood ratio, if the response is a likelihood).

If there are more parameters, calc2D3Dplots plots a “slice” of the predicted surface, both as a 2D surface plot and as a 3D perspective plot, for each pair of parameters. A slice plot for a pair of parameters fixes all other parameters to values maximizing the response (hence, maximum likelihood estimates, if the response is a likelihood). calcProfileLR plots the profile response surface relative to its maximum (hence, a profile likelihood ratio, if the response is a likelihood) for pairs of parameters in varNames.

Two dimensional profile plots not only require many numerical maximizations, but will look ugly whenever one of these maximizations fails to find the right maximum, hence additional intensive computations are performed to minimize this problem. As a result, they are quite slow to compute, unless a low gridStepsNbr (say < 16) is used, in which case they do not look smooth.

Value

Returns NULL invisibly


blackbox documentation built on May 29, 2024, 1:15 a.m.