uncons | R Documentation |
Takes a fitted cirls
object and returns the corresponding unconstrained model.
uncons(object)
object |
Fitted 'cirls' object. |
If any starting values were provided to fit the cirls
object, they are not transferred to the fitting of the unconstrained model.
A cirls
object.
# Generate some data
n <- 1000
betas <- c(0, 1, 2, -1, 1)
p <- length(betas)
x <- matrix(rnorm(n * p), n, p)
eta <- 5 + x %*% betas
y <- eta + rnorm(n, 0, .2)
# Fit two cirls models, passing Cmat through the two different pathways
cinc <- diff(diag(p))
res1 <- glm(y ~ x, method = cirls.fit, Cmat = list(x = cinc))
res2 <- glm(y ~ x, method = cirls.fit, control = list(Cmat = list(x = cinc)))
# 'Unconstrain' the models
uc1 <- uncons(res1)
uc2 <- uncons(res2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.