disp

Display generalized linear regression model

Syntax

disp(mdl)

Description

disp(mdl) displays the mdl linear model.

Input Arguments

mdl

Generalized linear model, specified as a full GeneralizedLinearModel object constructed using fitglm or stepwiseglm, or a compacted CompactGeneralizedLinearModel object constructed using compact.

Examples

expand all

Create and display a generalized linear regression model.

Create a generalized linear regression model of Poisson data.

X = 2 + randn(100,1);
mu = exp(1 + X/2);
y = poissrnd(mu);
mdl = fitglm(X,y,...
    'y ~ x1','distr','poisson');

Display the model.

disp(mdl)
Generalized linear regression model:
    log(y) ~ 1 + x1
    Distribution = Poisson

Estimated Coefficients:
                   Estimate       SE       tStat       pValue  
                   ________    ________    ______    __________

    (Intercept)    0.99516     0.080089    12.426    1.8947e-35
    x1             0.50906     0.025557    19.919    2.7949e-88


100 observations, 98 error degrees of freedom
Dispersion: 1
Chi^2-statistic vs. constant model: 374, p-value = 2.53e-83

Alternatives

Enter mdl at the command line to obtain a display, where mdl is the name of your model.