View source: R/signal_strength.R
signal_strength | R Documentation |
signal_strength
estimates (\beta_0, \gamma)
using the estimated \kappa_s
and observed proportion of successes.
signal_strength(
rho_prime = rho_prime_logistic,
kappa_hat,
intercept = FALSE,
p0 = NA,
verbose = FALSE,
tol = 1e-04
)
rho_prime |
A function that computes the success probability |
kappa_hat |
Numeric. Estimated dimension where the data becomes linearly separable |
intercept |
Logical |
p0 |
Numeric. Proportion of outcomes |
verbose |
Should progress be printed? If |
tol |
Numeric. Tolerance to be used in |
Assume that Y
depends on X
as
\mathrm{P}(Y=1\,|\,X) = \rho'(X^\top \beta + \beta_0),
and let the signal strength be \gamma = \mathrm{Var}(X^\top \beta)^{1/2}
.
The pair (\beta_0, \gamma)
satisfies
They are on the phase transition curve \kappa(\beta_0, \gamma)
.
\hat{\kappa} \approx \kappa(\beta_0, \gamma)
The observed proportion of Y=1
should be close to the expected proportion.
p_0 \approx \mathrm{P}(Y = 1\,|\, \beta_0, \gamma) = \mathrm{E}{\mathrm{Ber}(\rho'(\beta_0 + \gamma Z)}
where Z
is a standard normal variable.
We solve the above system of two equations to obtain an estimate of (\beta_0, \gamma)
If the model does not contain an intercept, returns estimated gamma_hat
.
Otherwise, returns a list with two components
Estimated signal strength.
Estimated intercept.
## Not run:
# no signal case
# should return 0, returns 0.0127
signal <- signal_strength(kappa_hat = 0.5, intercept = FALSE)
signal$gamma_hat
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.