glmval
Generalized linear model values
Syntax
yhat = glmval(b,X,
link
)
[yhat,dylo,dyhi] = glmval(b,X,link
,stats)
[...] = glmval(...,param1
,val1
,param2
,val2
,...)
Description
yhat = glmval(b,X,
computes predicted values for the generalized linear model with link function
link
)link
and predictors X
. Distinct predictor variables should
appear in different columns of X
. b
is a vector of
coefficient estimates as returned by the glmfit
function. link
can be any of the character vectors, string
scalars, or custom-defined link functions used as values for the 'link'
name-value pair argument in the glmfit
function.
Note
By default, glmval
adds a first column of 1s to X
,
corresponding to a constant term in the model. Do not enter a column of 1s directly into
X
. You can change the default behavior of glmval
using
the 'constant'
parameter.
[yhat,dylo,dyhi] = glmval(b,X,
also
computes 95% confidence bounds for the predicted values. When the link
,stats)stats
structure
output of the glmfit
function is specified, dylo
and dyhi
are
also returned. dylo
and dyhi
define
a lower confidence bound of yhat-dylo
, and an
upper confidence bound of yhat+dyhi
. Confidence
bounds are nonsimultaneous, and apply to the fitted curve, not to
a new observation.
[...] = glmval(...,
specifies optional parameter name/value pairs to control the predicted values. Acceptable
parameters are listed in this table:param1
,val1
,param2
,val2
,...)
Parameter | Value |
---|---|
| A scalar between 0 and 1 |
| A scalar, or a vector with one value for each row of X |
| A vector |
'constant' |
|
'simultaneous' — Compute simultaneous
confidence intervals (true ), or compute non-simultaneous
confidence intervals (default false ) | true or false |
Examples
References
[1] Dobson, A. J. An Introduction to Generalized Linear Models. New York: Chapman & Hall, 1990.
[2] McCullagh, P., and J. A. Nelder. Generalized Linear Models. New York: Chapman & Hall, 1990.
[3] Collett, D. Modeling Binary Data. New York: Chapman & Hall, 2002.
Extended Capabilities
Version History
Introduced before R2006a