print.unireg {uniReg} | R Documentation |
Print method for unireg
objects.
Description
Prints unimodal regression objects.
Usage
## S3 method for class 'unireg'
print(x, ...)
Arguments
x |
Object of class |
... |
Further arguments (currently not used). |
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.
Value
Invisibly returns the input x
.
Author(s)
Claudia Koellmann
See Also
unireg
,plot.unireg
,points.unireg
Examples
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
[Package uniReg version 1.1 Index]