Cross-Validated Pairs Plot (Helper Functions)
np.pairs.RdCompute pairwise nonparametric regressions and densities for a set of variables, then plot a pairs-style display with fitted smoothers.
Arguments
Data, Bandwidth Inputs And Formula Interface
These arguments identify the variables, data, and pair specifications to plot.
- pair.list
list returned by
np.pairs.- y.dat
data frame containing the variables listed in
y.vars. With two or more distinct selected variables, each must be a numeric (integer or double) response vector, because each appears as an off-diagonal regression outcome. Factors, ordered factors and logical responses are rejected before fitting; their integer codes are not treated as numeric outcomes.- y.vars
character vector of column names in
y.dat. Ify.varsis named, the names are used as plot labels.
Value
np.pairs returns a list with components
y_vars, pair_names, and pair_kerns.
np.pairs.plot returns NULL (invisibly).
Details
Documentation guide: see np.kernels for kernels, np.options for global options, and plot for plotting options.
On the diagonal, npudens is used to compute kernel density
estimates. Off-diagonal panels use npreg with residuals to draw
scatterplots and smoothers.