print.unireg: Print method for 'unireg' objects.

Description Usage Arguments Details Value Author(s) See Also Examples

Description

Prints unimodal regression objects.

Usage

1
2
## S3 method for class 'unireg'
print(x, ...)

Arguments

x

Object of class 'unireg', a result of function unireg.

...

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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
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

uniReg documentation built on May 2, 2019, 6:50 a.m.

Related to print.unireg in uniReg...