print.sop: Print method for sop objects

View source: R/print.sop.R

print.sopR Documentation

Print method for sop objects

Description

Print method for sop objects

Usage

## S3 method for class 'sop'
print(x, ...)

Arguments

x

an object of class sop as produced by sop()

...

further arguments passed to or from other methods. Not yet implemented.

Value

Prints some summary statistics of the fitted model.

See Also

sop

Examples

library(SOP)
# Simulate the data
set.seed(123)
n <- 1000
sigma <- 0.5
x <- runif(n)
f0 <- function(x) 2*sin(pi*x)
f <- f0(x)
y <- f + rnorm(n, 0, sigma)
dat <- data.frame(x = x, y = y)

# Fit the model
m0 <- sop(formula = y ~ f(x, nseg = 10), data = dat)
m0

SOP documentation built on Sept. 16, 2023, 1:07 a.m.