print.sop | R Documentation |
Print method for sop objects
## S3 method for class 'sop'
print(x, ...)
x |
an object of class |
... |
further arguments passed to or from other methods. Not yet implemented. |
Prints some summary statistics of the fitted model.
sop
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
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.