Learn R Programming

uniReg (version 1.1)

print.unireg: Print method for unireg objects.

Description

Prints unimodal regression objects.

Usage

"print"(x, ...)

Arguments

x
Object of class 'unireg', a result of function unireg.
...
Further arguments (currently not used).

Value

x.

Details

Prints a short overview of a fitted unimodal regression object to the console, namely, the type of the fitted model (including degree of the spline and type of constraint and penalty), the coefficients and their mode location, the tuning parameter and the variance estimate.

See Also

unireg,plot.unireg,points.unireg

Examples

Run this code
x <- sort(rep(0:5,20))         
n <- length(x)               
set.seed(41333)
func <- function(mu){rnorm(1,mu,0.05)}
y <- sapply(dchisq(x,3),func)

# plot of data
plot(jitter(x), y, xlab="x (jittered)")

# fit with default settings
fit <- unireg(x, y, g=5)
# short overview of the fitted spline
fit

Run the code above in your browser using DataLab