uncons: Unconstrained model

View source: R/uncons.R

unconsR Documentation

Unconstrained model

Description

Takes a fitted cirls object and returns the corresponding unconstrained model.

Usage

uncons(object)

Arguments

object

Fitted 'cirls' object.

Details

Note on starting values

If any starting values were provided to fit the cirls object, they are not transferred to the fitting of the unconstrained model.

Value

A cirls object.

Examples

# 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)


cirls documentation built on Sept. 13, 2025, 1:09 a.m.