View source: R/separable_proportion.R
separable_proportion | R Documentation |
This function randomly generate B
subsamples of size nn
and
returns the proportion of times that a subsample is linearly separable.
separable_proportion(X, Y, nn, B = 10)
X |
Covariate matrix. Each row in |
Y |
Response vector of |
nn |
Number of observations in each subsample. |
B |
Numeric. Number of subsamples. |
Numeric. The proportion of separable subsamples.
## Not run:
n <- 1000; p <- 400
X <- matrix(rnorm(n*p, 0, 1), n, p)
Y <- 2 * rbinom(n, 1, 0.5) - 1
separable_proportion(X, Y, nn = 600, B = 10)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.