gen_para: Generate true parameters using an adjacency matrix

Description Usage Arguments Details Value

View source: R/gen_para.R

Description

Generate true parameters using an adjacency matrix

Usage

1
2
3
4
5
6
7
8
9
gen_para(
  A_true,
  types_by_node = NULL,
  n_resps_by_node = NULL,
  intcpt = c("always", "for_child_only", "none"),
  range = c(0.5, 1),
  prob_sparse = 0,
  seed = 1
)

Arguments

A_true

binary matrix, a true adjacecny matrix from a desired graph.

types_by_node

blah

n_resps_by_node

blah

intcpt

blah

range

a possible range of (absolute value of) parameters.

prob_sparse

double scalar, define a sparseness of parameters within each parameter sub-matrix with 0≤ prob_sparse ≤ 1 - default is 0. If prob_sparse = 0, all the parameter for each submatrix will be non-zeros. Not recommnedable, but, if prob_sparse = 1, all the parameter for each submatrix will be zeros. See details below for the parameter sub-matrix.

seed

blah

Details

The parameter matrix can be divided into submatrices. For example, a submatrix (i,j) consists of parameters related to (node i) -> (node j). The prob_sparse controls the sparseness of parameters within each submatrix.

Value

double matrix, true parameter matrix, W_true is returend with n_levels or n_group_elmts as an attribute.


yongsu-lee/NOTEARGIS documentation built on Dec. 27, 2020, 6:58 p.m.