G02 Chapter Contents (PDF version)
G02 Chapter Introduction
NAG Library Manual

NAG Library Chapter Contents

G02 – Correlation and Regression Analysis

G02 Chapter Introduction

Routine
Name
Mark of
Introduction

Purpose
G02AAF
Example Text
Example Data
22 nagf_correg_corrmat_nearest
Computes the nearest correlation matrix to a real square matrix, using the method of Qi and Sun
G02ABF
Example Text
Example Data
23 nagf_correg_corrmat_nearest_bounded
Computes the nearest correlation matrix to a real square matrix, augmented G02AAF to incorporate weights and bounds
G02AEF
Example Text
Example Data
23 nagf_correg_corrmat_nearest_kfactor
Computes the nearest correlation matrix with k-factor structure to a real square matrix
G02AJF
Example Text
Example Data
24 nagf_nearest_correlation_h_weight
Computes the nearest correlation matrix to a real square matrix, using element-wise weighting
G02ANF
Example Text
Example Data
25 nagf_nearest_correlation_shrinking
Computes a correlation matrix from an approximate matrix with fixed submatrix
G02BAF
Example Text
Example Data
4 nagf_correg_coeffs_pearson
Pearson product-moment correlation coefficients, all variables, no missing values
G02BBF
Example Text
Example Data
4 nagf_correg_coeffs_pearson_miss_case
Pearson product-moment correlation coefficients, all variables, casewise treatment of missing values
G02BCF
Example Text
Example Data
4 nagf_correg_coeffs_pearson_miss_pair
Pearson product-moment correlation coefficients, all variables, pairwise treatment of missing values
G02BDF
Example Text
Example Data
4 nagf_correg_coeffs_zero
Correlation-like coefficients (about zero), all variables, no missing values
G02BEF
Example Text
Example Data
4 nagf_correg_coeffs_zero_miss_case
Correlation-like coefficients (about zero), all variables, casewise treatment of missing values
G02BFF
Example Text
Example Data
4 nagf_correg_coeffs_zero_miss_pair
Correlation-like coefficients (about zero), all variables, pairwise treatment of missing values
G02BGF
Example Text
Example Data
4 nagf_correg_coeffs_pearson_subset
Pearson product-moment correlation coefficients, subset of variables, no missing values
G02BHF
Example Text
Example Data
4 nagf_correg_coeffs_pearson_subset_miss_case
Pearson product-moment correlation coefficients, subset of variables, casewise treatment of missing values
G02BJF
Example Text
Example Data
4 nagf_correg_coeffs_pearson_subset_miss_pair
Pearson product-moment correlation coefficients, subset of variables, pairwise treatment of missing values
G02BKF
Example Text
Example Data
4 nagf_correg_coeffs_zero_subset
Correlation-like coefficients (about zero), subset of variables, no missing values
G02BLF
Example Text
Example Data
4 nagf_correg_coeffs_zero_subset_miss_case
Correlation-like coefficients (about zero), subset of variables, casewise treatment of missing values
G02BMF
Example Text
Example Data
4 nagf_correg_coeffs_zero_subset_miss_pair
Correlation-like coefficients (about zero), subset of variables, pairwise treatment of missing values
G02BNF
Example Text
Example Data
4 nagf_correg_coeffs_kspearman_overwrite
Kendall/Spearman non-parametric rank correlation coefficients, no missing values, overwriting input data
G02BPF
Example Text
Example Data
4 nagf_correg_coeffs_kspearman_miss_case_overwrite
Kendall/Spearman non-parametric rank correlation coefficients, casewise treatment of missing values, overwriting input data
G02BQF
Example Text
Example Data
4 nagf_correg_coeffs_kspearman
Kendall/Spearman non-parametric rank correlation coefficients, no missing values, preserving input data
G02BRF
Example Text
Example Data
4 nagf_correg_coeffs_kspearman_miss_case
Kendall/Spearman non-parametric rank correlation coefficients, casewise treatment of missing values, preserving input data
G02BSF
Example Text
Example Data
4 nagf_correg_coeffs_kspearman_miss_pair
Kendall/Spearman non-parametric rank correlation coefficients, pairwise treatment of missing values
G02BTF
Example Text
Example Data
14 nagf_correg_ssqmat_update
Update a weighted sum of squares matrix with a new observation
G02BUF
Example Text
Example Data
14 nagf_correg_ssqmat
Computes a weighted sum of squares matrix
G02BWF
Example Text
Example Data
14 nagf_correg_ssqmat_to_corrmat
Computes a correlation matrix from a sum of squares matrix
G02BXF
Example Text
Example Data
14 nagf_correg_corrmat
Computes (optionally weighted) correlation and covariance matrices
G02BYF
Example Text
Example Data
17 nagf_correg_corrmat_partial
Computes partial correlation/variance-covariance matrix from correlation/variance-covariance matrix computed by G02BXF
G02BZF
Example Text
Example Data
24 nagf_correg_ssqmat_combine
Combines two sums of squares matrices, for use after G02BUF
G02CAF
Example Text
Example Data
4 nagf_correg_linregs_const
Simple linear regression with constant term, no missing values
G02CBF
Example Text
Example Data
4 nagf_correg_linregs_noconst
Simple linear regression without constant term, no missing values
G02CCF
Example Text
Example Data
4 nagf_correg_linregs_const_miss
Simple linear regression with constant term, missing values
G02CDF
Example Text
Example Data
4 nagf_correg_linregs_noconst_miss
Simple linear regression without constant term, missing values
G02CEF
Example Text
Example Data
4 nagf_correg_linregm_service_select
Service routine for multiple linear regression, select elements from vectors and matrices
G02CFF
Example Text
Example Data
4 nagf_correg_linregm_service_reorder
Service routine for multiple linear regression, reorder elements of vectors and matrices
G02CGF
Example Text
Example Data
4 nagf_correg_linregm_coeffs_const
Multiple linear regression, from correlation coefficients, with constant term
G02CHF
Example Text
Example Data
4 nagf_correg_linregm_coeffs_noconst
Multiple linear regression, from correlation-like coefficients, without constant term
G02DAF
Example Text
Example Data
14 nagf_correg_linregm_fit
Fits a general (multiple) linear regression model
G02DCF
Example Text
Example Data
14 nagf_correg_linregm_obs_edit
Add/delete an observation to/from a general linear regression model
G02DDF
Example Text
Example Data
14 nagf_correg_linregm_update
Estimates of linear parameters and general linear regression model from updated model
G02DEF
Example Text
Example Data
14 nagf_correg_linregm_var_add
Add a new independent variable to a general linear regression model
G02DFF
Example Text
Example Data
14 nagf_correg_linregm_var_del
Delete an independent variable from a general linear regression model
G02DGF
Example Text
Example Data
14 nagf_correg_linregm_fit_newvar
Fits a general linear regression model to new dependent variable
G02DKF
Example Text
Example Data
14 nagf_correg_linregm_constrain
Estimates and standard errors of parameters of a general linear regression model for given constraints
G02DNF
Example Text
Example Data
14 nagf_correg_linregm_estfunc
Computes estimable function of a general linear regression model and its standard error
G02EAF
Example Text
Example Data
14 nagf_correg_linregm_rssq
Computes residual sums of squares for all possible linear regressions for a set of independent variables
G02ECF
Example Text
Example Data
14 nagf_correg_linregm_rssq_stat
Calculates R2 and CP values from residual sums of squares
G02EEF
Example Text
Example Data
14 nagf_correg_linregm_fit_onestep
Fits a linear regression model by forward selection
G02EFF
Example Text
Example Data
21 nagf_correg_linregm_fit_stepwise
Stepwise linear regression
G02FAF
Example Text
Example Data
14 nagf_correg_linregm_stat_resinf
Calculates standardized residuals and influence statistics
G02FCF
Example Text
Example Data
15 nagf_correg_linregm_stat_durbwat
Computes Durbin–Watson test statistic
G02GAF
Example Text
Example Data
14 nagf_correg_glm_normal
Fits a generalized linear model with Normal errors
G02GBF
Example Text
Example Data
14 nagf_correg_glm_binomial
Fits a generalized linear model with binomial errors
G02GCF
Example Text
Example Data
14 nagf_correg_glm_poisson
Fits a generalized linear model with Poisson errors
G02GDF
Example Text
Example Data
14 nagf_correg_glm_gamma
Fits a generalized linear model with gamma errors
G02GKF
Example Text
Example Data
14 nagf_correg_glm_constrain
Estimates and standard errors of parameters of a general linear model for given constraints
G02GNF
Example Text
Example Data
14 nagf_correg_glm_estfunc
Computes estimable function of a generalized linear model and its standard error
G02GPF
Example Text
Example Data
22 nagf_correg_glm_predict
Computes a predicted value and its associated standard error based on a previously fitted generalized linear model
G02HAF
Example Text
Example Data
13 nagf_correg_robustm
Robust regression, standard M-estimates
G02HBF
Example Text
Example Data
13 nagf_correg_robustm_wts
Robust regression, compute weights for use with G02HDF
G02HDF
Example Text
Example Data
13 nagf_correg_robustm_user
Robust regression, compute regression with user-supplied functions and weights
G02HFF
Example Text
Example Data
13 nagf_correg_robustm_user_varmat
Robust regression, variance-covariance matrix following G02HDF
G02HKF
Example Text
Example Data
14 nagf_correg_robustm_corr_huber
Calculates a robust estimation of a covariance matrix, Huber's weight function
G02HLF
Example Text
Example Data
14 nagf_correg_robustm_corr_user_deriv
Calculates a robust estimation of a covariance matrix, user-supplied weight function plus derivatives
G02HMF
Example Text
Example Data
14 nagf_correg_robustm_corr_user
Calculates a robust estimation of a covariance matrix, user-supplied weight function
G02JAF
Example Text
Example Data
21 nagf_correg_mixeff_reml
Linear mixed effects regression using Restricted Maximum Likelihood (REML)
G02JBF
Example Text
Example Data
21 nagf_correg_mixeff_ml
Linear mixed effects regression using Maximum Likelihood (ML)
G02JCF 23 nagf_correg_mixeff_hier_init
Hierarchical mixed effects regression, initialization routine for G02JDF and G02JEF
G02JDF
Example Text
Example Data
23 nagf_correg_mixeff_hier_reml
Hierarchical mixed effects regression using Restricted Maximum Likelihood (REML)
G02JEF
Example Text
Example Data
23 nagf_correg_mixeff_hier_ml
Hierarchical mixed effects regression using Maximum Likelihood (ML)
G02KAF
Example Text
Example Data
22 nagf_correg_ridge_opt
Ridge regression, optimizing a ridge regression parameter
G02KBF
Example Text
Example Data
22 nagf_correg_ridge
Ridge regression using a number of supplied ridge regression parameters
G02LAF
Example Text
Example Data
22 nagf_correg_pls_svd
Partial least squares (PLS) regression using singular value decomposition
G02LBF
Example Text
Example Data
22 nagf_correg_pls_wold
Partial least squares (PLS) regression using Wold's iterative method
G02LCF
Example Text
Example Data
22 nagf_correg_pls_fit
PLS parameter estimates following partial least squares regression by G02LAF or G02LBF
G02LDF
Example Text
Example Data
22 nagf_correg_pls_pred
PLS predictions based on parameter estimates from G02LCF
G02MAF
Example Text
Example Data
Example Plot
25 nagf_correg_lars
Least angle regression (LARS), least absolute shrinkage and selection operator (LASSO) and forward stagewise regression
G02MBF
Example Text
Example Data
Example Plot
25 nagf_correg_lars_xtx
Least Angle Regression (LARS), Least Absolute Shrinkage and Selection Operator (LASSO) and forward stagewise regression using the cross-products matrix
G02MCF
Example Text
Example Data
25 nagf_correg_lars_param
Additional parameter calculate following Least Angle Regression (LARS), Least Absolute Shrinkage and Selection Operator (LASSO) or forward stagewise regression
G02QFF
Example Text
Example Data
Example Plot
23 nagf_correg_quantile_linreg_easy
Linear quantile regression, simple interface, independent, identically distributed (IID) errors
G02QGF
Example Text
Example Data
Example Plot
23 nagf_correg_quantile_linreg
Linear quantile regression, comprehensive interface
G02ZKF 23 nagf_correg_optset
Option setting routine for G02QGF
G02ZLF 23 nagf_correg_optget
Option getting routine for G02QGF

G02 Chapter Contents (PDF version)
G02 Chapter Introduction
NAG Library Manual

© The Numerical Algorithms Group Ltd, Oxford, UK. 2015