summary.sop: Summary method for a fitted SOP model.

View source: R/summary.sop.R

summary.sopR Documentation

Summary method for a fitted SOP model.

Description

Summary method for a fitted SOP model.

Usage

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

Arguments

object

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

...

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

Value

The function summary.sop computes and returns a list of summary statistics of the fitted model given in object, using the components (list elements) "call" and "terms" from its argument, plus

call

the matched call.

b.random

a vector with the predicted random effects coefficients.

b.fixed

a vector with the estimated fixed effects coefficients.

r.sq.adj

the (adjusted) R^2, i.e., ‘fraction of variance explained by the model’,

R^2 = 1 - \frac{\sum_i{R_i^2}/(n-df)}{\sum_i(y_i- y^*)^2/(n-1)},

where R_i = w_i(y_i - \mu_i) and y^* is the (weighted) mean of y_i.

deviance

the deviance.

null.deviance

the null deviance.

dev.expl

proportion of the null deviance explained by the model.

n

number of data.

iter

number of iterations.

residual.df

residual degrees of freedom.

edf

a vector with the estimated degrees of freedom for the (smooth and random) model terms.

formula

the model formula.

family

the family used.

na.action

vector with the observations (position) deleted due to missingness.

See Also

sop, summary

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)
summary(m0)

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