edge.selection: Edge Selection

View source: R/edge.selection.R

edge.selectionR Documentation

Edge Selection

Description

Extension of gss package for edge selection

Usage

edge.selection(data, method, ...)

Arguments

data

Data frame containing all variables.

method

Method type to select edges.

...

Any options can be defined.

  • type List specifying the type of spline for each variable.

  • alpha Parameter defining cross-validation score for smoothing parameter selection.

  • subset Optional vector specifying a subset of observations to be used in the fitting process.

  • na.action Function which indicates what should happen when the data contain NAs.

  • seed Seed to be used for the random generation of "knots."

  • prec Precision requirement for internal iterations.

  • maxiter Maximum number of iterations allowed for internal iterations.

  • id.basis Index of observations to be used as "knots."

  • nbasis Number of "knots" to be used.

  • domain Data frame specifying marginal support of density in the joint method.

  • quad Quadrature for calculating integral in the joint method. Mandatory if variables other than factors or numerical vectors are involved.

  • w Optional vector to specify weights for two-way interactions in the joint method.

  • rho Method to construct rho function for neighborhood selection method.

  • ydomain Data frame specifying marginal support of conditional density in the neighborhood selection method.

  • yquad Quadrature for calculating integral on Y domain in the neighborhood selection method. Mandatory if response variables other than factors or numerical vectors are involved.

  • skip.iter Flag indicating whether to use initial values of theta and skip theta iteration in the neighborhood selection method.

  • W Optional matrix to specify weights for two-way interactions in the neighborhood selection method for each node.

  • neighborhoodMethod Method type in the neighborhood selection method to select tuning parameter which controls sparsity of the graph.

  • px Dimension of variables in the semi-parametric method to be estimated using non-parametric method.

  • maxLambda Number used to generate the range of the tuning parameter for selection of Lambda matrix.

  • maxTheta Number used to generate the range of the tuning parameter for selection of Theta matrix.

  • iterLambda Number of iterations to find optimal Lambda matrix.

  • iterTheta Number of iterations to find optimal Theta matrix.

  • cutoff Cutoff value for squared projection.

  • N Number of simulations in non-parametric part to calculate the standard error.

  • semiMethod Method type to select optimal matrix in semi-parametric method.

Details

type, alpha, subset, na.action, seed, prec, maxiter, id.basis, nbasis are arguments shared by the joint and neighborhood selection method. They also work the same as in gss package. domain, quad are two arguments for the joint method and work the same as ssden1 in gss package. w is an option argument in the joint method. rho, ydomain, yquad, skip.iter are arguments for the neighborhood selection method. They work the same as sscden1 in gss package. W2, neighborhoodMethod are two optional arguments in the neighborhood selection method. The rest of argument options are specifically for the semi-parametric method.

Examples

# Use joint method for edge selection.
library(gss)
data(NO2)
edge.selection(data = NO2, method = "joint", nbasis = 100)
# Use neighborhood selection method for edge selection.
# Parallel backend
library(doMC)
library(foreach)
library(huge)
registerDoMC(20)
n <- 200; p <- 20
# Simulate high dimension data
set.seed(5732)
z <- huge.generator(n, d = p, graph = "random", prob = .2, verbose = FALSE, vis = FALSE, v = .65)
data <- data.frame(z$data)
edge.selection(data = data, method = "neighborhood")
# Use semi-parametric method for edge selection.
# Assume we estimate the first five variables using non-parametric method.
px <- 5
edge.selection(data = data, method ="semi", px = px)

haodongucsb/edgeSelection documentation built on May 8, 2022, 4:40 p.m.