Description Usage Arguments Value Examples
Predict or fitted values of object ConsReg
1 2 |
object |
object of class |
newdata |
New data to predict the objective function. If is NULL (default), then the fitted values will be returned |
components |
if its |
... |
Additional argument passed to family. In particular, at this moment, if type = 'link', then for binomial family, it will return the link values |
predictions
1 2 3 4 5 6 7 8 9 10 11 12 | data('fake_data')
data = fake_data
data$y = 1/(1+exp(-data$y))
data$y = ifelse(data$y > .5, 1, 0)
table(data$y)
fit5 = ConsReg(y~x1+x2+x3+x4, data = data,
family = 'binomial', penalty = 10000,
LOWER = -.5, UPPER = .2,
optimizer = 'gosolnp')
pr = predict(fit5, newdata = data[1:3,], type = 'probability')
pr
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.