Learn R Programming

KSPM (version 0.2.1)

nobs.kspm: Extract the number of observations from a Kernel Semi parametric Model Fit

Description

Extract the number of observations use to estimate the model coefficients. This is principally intented to be used in computing BIC (see extractAIC.kspm).

Usage

# S3 method for kspm
nobs(object, ...)

Arguments

object

an object of class "kspm", usually, a result of a call to kspm.

...

additional optional argument (currently unused).

Value

A single number (integer).

See Also

kspm for fitting model, extractAIC.kspm.

Examples

Run this code
# NOT RUN {
x <- 1:15
y <- 3*x + rnorm(15, 0, 2)
fit <- kspm(y, kernel = ~ Kernel(x, kernel.function = "linear"))
nobs(fit)

# }

Run the code above in your browser using DataLab