This manual relates to an old release of the Library.
The documentation for the current release is also available on this site.

NAG CL Interface
G02 (Correg)
Correlation and Regression Analysis

Settings help

CL Name Style:


G02 (Correg) Chapter Introduction – A description of the Chapter and an overview of the algorithms available.

Function
Mark of
Introduction

Purpose
g02aac 9 nag_correg_corrmat_nearest
Computes the nearest correlation matrix to a real square matrix, using the method of Qi and Sun
g02abc 23 nag_correg_corrmat_nearest_bounded
Computes the nearest correlation matrix to a real square matrix, augmenting g02aac to incorporate weights and bounds
g02aec 23 nag_correg_corrmat_nearest_kfactor
Computes the nearest correlation matrix with k-factor structure to a real square matrix
g02ajc 24 nag_correg_corrmat_h_weight
Computes the nearest correlation matrix to a real square matrix, using element-wise weighting
g02akc 27 nag_correg_corrmat_nearest_rank
Computes the rank-constrained nearest correlation matrix to a real square matrix, using the method of Qi and Sun
g02anc 25 nag_correg_corrmat_shrinking
Computes a correlation matrix from an approximate matrix with fixed submatrix
g02apc 26 nag_correg_corrmat_target
Computes a correlation matrix from an approximate one using a specified target matrix
g02asc 27 nag_correg_corrmat_fixed
Computes the nearest correlation matrix to a real square matrix, with fixed elements
g02brc 3 nag_correg_coeffs_kspearman_miss_case
Kendall and/or Spearman non-parametric rank correlation coefficients, allows variables and observations to be selectively disregarded
g02btc 7 nag_correg_ssqmat_update
Update a weighted sum of squares matrix with a new observation
g02buc 7 nag_correg_ssqmat
Computes a weighted sum of squares matrix
g02bwc 7 nag_correg_ssqmat_to_corrmat
Computes a correlation matrix from a sum of squares matrix
g02bxc 3 nag_correg_corrmat
Product-moment correlation, unweighted/weighted correlation and covariance matrix, allows variables to be disregarded
g02byc 6 nag_correg_corrmat_partial
Computes partial correlation/variance-covariance matrix from correlation/variance-covariance matrix computed by g02bxc
g02bzc 24 nag_correg_ssqmat_combine
Combines two sums of squares matrices, for use after g02buc
g02cac 3 nag_correg_linregs_const
Simple linear regression with or without a constant term, data may be weighted
g02cbc 3 nag_correg_linregs_noconst
Simple linear regression confidence intervals for the regression line and individual points
g02dac 1 nag_correg_linregm_fit
Fits a general (multiple) linear regression model
g02dcc 2 nag_correg_linregm_obs_edit
Add/delete an observation to/from a general linear regression model
g02ddc 2 nag_correg_linregm_update
Estimates of regression parameters from an updated model
g02dec 2 nag_correg_linregm_var_add
Add a new independent variable to a general linear regression model
g02dfc 2 nag_correg_linregm_var_del
Delete an independent variable from a general linear regression model
g02dgc 1 nag_correg_linregm_fit_newvar
Fits a general linear regression model to new dependent variable
g02dkc 2 nag_correg_linregm_constrain
Estimates of parameters of a general linear regression model for given constraints
g02dnc 2 nag_correg_linregm_estfunc
Estimate of an estimable function for a general linear regression model
g02eac 7 nag_correg_linregm_rssq
Computes residual sums of squares for all possible linear regressions for a set of independent variables
g02ecc 7 nag_correg_linregm_rssq_stat
Calculates R2 and CP values from residual sums of squares
g02eec 7 nag_correg_linregm_fit_onestep
Fits a linear regression model by forward selection
g02efc 8 nag_correg_linregm_fit_stepwise
Stepwise linear regression
g02fac 1 nag_correg_linregm_stat_resinf
Calculates standardized residuals and influence statistics
g02fcc 7 nag_correg_linregm_stat_durbwat
Computes Durbin–Watson test statistic
g02gac 4 nag_correg_glm_normal
Fits a generalized linear model with Normal errors
g02gbc 4 nag_correg_glm_binomial
Fits a generalized linear model with binomial errors
g02gcc 4 nag_correg_glm_poisson
Fits a generalized linear model with Poisson errors
g02gdc 4 nag_correg_glm_gamma
Fits a generalized linear model with gamma errors
g02gkc 4 nag_correg_glm_constrain
Estimates and standard errors of parameters of a general linear model for given constraints
g02gnc 4 nag_correg_glm_estfunc
Estimable function and the standard error of a generalized linear model
g02gpc 9 nag_correg_glm_predict
Computes a predicted value and its associated standard error based on a previously fitted generalized linear model
g02hac 4 nag_correg_robustm
Robust regression, standard M-estimates
g02hbc 7 nag_correg_robustm_wts
Robust regression, compute weights for use with g02hdc
g02hdc 7 nag_correg_robustm_user
Robust regression, compute regression with user-supplied functions and weights
g02hfc 7 nag_correg_robustm_user_varmat
Robust regression, variance-covariance matrix following g02hdc
g02hkc 4 nag_correg_robustm_corr_huber
Robust estimation of a covariance matrix, Huber's weight function
g02hlc 7 nag_correg_robustm_corr_user_deriv
Calculates a robust estimation of a covariance matrix, user-supplied weight function plus derivatives
g02hmc 7 nag_correg_robustm_corr_user
Calculates a robust estimation of a covariance matrix, user-supplied weight function
g02jfc 27 nag_correg_lmm_init
Linear mixed effects regression, initialization function for g02jhc
g02jgc 27 nag_correg_lmm_init_combine
Linear mixed effects regression, initialization function for g02jgc and g02jhc
g02jhc 27 nag_correg_lmm_fit
Linear mixed effects regression using either Restricted Maximum Likelihood (REML) or Maximum Likelihood (ML)
g02kac 9 nag_correg_ridge_opt
Ridge regression, optimizing a ridge regression parameter
g02kbc 9 nag_correg_ridge
Ridge regression using a number of supplied ridge regression parameters
g02lac 9 nag_correg_pls_svd
Partial least squares (PLS) regression using singular value decomposition
g02lbc 9 nag_correg_pls_wold
Partial least squares (PLS) regression using Wold's iterative method
g02lcc 9 nag_correg_pls_fit
PLS parameter estimates following partial least squares regression by g02lac or g02lbc
g02ldc 9 nag_correg_pls_pred
PLS predictions based on parameter estimates from g02lcc
g02mac 25 nag_correg_lars
Least angle regression (LARS), least absolute shrinkage and selection operator (LASSO) and forward stagewise regression
g02mbc 25 nag_correg_lars_xtx
Least Angle Regression (LARS), Least Absolute Shrinkage and Selection Operator (LASSO) and forward stagewise regression using the cross-products matrix
g02mcc 25 nag_correg_lars_param
Calculates additional parameter estimates following Least Angle Regression (LARS), Least Absolute Shrinkage and Selection Operator (LASSO) or forward stagewise regression
g02qfc 23 nag_correg_quantile_linreg_easy
Linear quantile regression, simple interface, independent, identically distributed (IID) errors
g02qgc 23 nag_correg_quantile_linreg
Linear quantile regression, comprehensive interface
g02zkc 23 nag_correg_optset
Option setting function for g02qgc
g02zlc 23 nag_correg_optget
Option getting function for g02qgc
g02jac 8
(Deprecated)
nag_correg_mixeff_reml
Linear mixed effects regression using Restricted Maximum Likelihood (REML)
g02jbc 8
(Deprecated)
nag_correg_mixeff_ml
Linear mixed effects regression using Maximum Likelihood (ML)
g02jcc 9
(Deprecated)
nag_correg_mixeff_hier_init
Hierarchical mixed effects regression, initialization function for g02jdc and g02jec
g02jdc 9
(Deprecated)
nag_correg_mixeff_hier_reml
Hierarchical mixed effects regression using Restricted Maximum Likelihood (REML)
g02jec 9
(Deprecated)
nag_correg_mixeff_hier_ml
Hierarchical mixed effects regression using Maximum Likelihood (ML)