beta_spread_covariates: Non-zero coefficients are spread out 'equally'

Description Usage Arguments Value

View source: R/covariateCoefficients.R

Description

Returns a function that itself return a coefficient vector where non-zero coefficients are spread out 'equally'. The values they take are given by the parameter values

Usage

1
2
3
4
5
6
7
beta_spread_covariates(
  p,
  s,
  indices = floor(seq(1, p, length.out = s)),
  values = rep(1, length(indices)),
  ...
)

Arguments

p

length of the vector

s

the number of vectors that are non-zero

indices

the indices of the coefficients that are non-zero (Default: equally spread out)

values

vector of length s that contains the values of the coefficients

Value

function that returns a vector of covariates where only the first s coefficients are non-zero


bips-hb/simsham documentation built on Dec. 19, 2021, 9:48 a.m.