NAG Library Chapter Contents

G02 (correg)
Correlation and Regression Analysis


G02 (correg) Chapter Introduction – a description of the Chapter and an overview of the algorithms available

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, augmenting 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_correg_corrmat_h_weight
Computes the nearest correlation matrix to a real square matrix, using element-wise weighting
g02anf
Example Text
Example Data
25 nagf_correg_corrmat_shrinking
Computes a correlation matrix from an approximate matrix with fixed submatrix
g02apf
Example Text
Example Data
26.0 nagf_correg_corrmat_target
Computes a correlation matrix from an approximate one using a specified target matrix
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
Calculates additional parameter estimates 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