summary.sback {wsbackfit}R Documentation

Summary for a sback fitted object

Description

Takes a fitted object produced by sback() and produces various useful summaries from it.

Usage

## S3 method for class 'sback'
summary(object, ...)

Arguments

object

an object of class sback as produced by sback().

...

other arguments (not implemented)

Value

An object of class summary.sback with the information needed to print the results.

Author(s)

Javier Roca-Pardinas, Maria Xose Rodriguez-Alvarez, Stefan Sperlich

See Also

sback, plot.sback

Examples

library(wsbackfit)
set.seed(123)
###############################################
# Gaussian Simulated Sample
###############################################
set.seed(123)
# Define the data generating process
n <- 1000
x1 <- runif(n)*4-2
x2 <- runif(n)*4-2
x3 <- runif(n)*4-2
x4 <- runif(n)*4-2
x5 <- as.numeric(runif(n)>0.6)

f1 <- 2*sin(2*x1)
f2 <- x2^2
f3 <- 0
f4 <- x4
f5 <- 1.5*x5

mu <- f1 + f2 + f3 + f4 + f5
err <- (0.5 + 0.5*x5)*rnorm(n)
y <- mu + err

df <- data.frame(x1 = x1, x2 = x2, x3 = x3, x4 = x4, x5 = as.factor(x5), y = y)

# Fit the model with a fixed bandwidth for each covariate
m0 <- sback(formula = y ~ x5 + sb(x1, h = 0.1) + sb(x2, h = 0.13) 
  + sb(x3, h = 0.1) + sb(x4, h = 0.1), kbin = 30, data = df)

summary(m0)

[Package wsbackfit version 1.0-5 Index]