fitQslow: Fits the moving window quadratic (or simple linear)...

Description Usage Arguments Details Value Author(s)

Description

A very slow version of fitQ that was coded independently in order to check fitQ. It is identical in every respect to fitQ except that it uses a slower algorithm that uses lm for the model fit.

Usage

1
2
fitQslow(y, x1, min.window = 5, start = 1, skip = 1,
  linear.only = FALSE)

Arguments

y

A numeric vector

x1

The linear predictor of a the regression model, whose length must be odd, and it must be monotonic (increasing or decreasing).

min.window

The minimum number of non-missing data points in a window that are required to fit the regression model.

start

The index of the center of the first window

skip

The number of indexes to advance the center of the moving window each time the model is fit.

linear.only

=TRUE fits a simple linear regression model with x1 as the single predictor, instead of a quadratic regression model.

Details

This function is for testing and validation only and is not exported.

Value

A matrix with the 4 columns that contain the results of the quadratic model fits:

a

The estimated intercepts

b

The estimated linear coefficients

c

The estimated quadratic coefficients. These are NA is linear.only=TRUE

d

The root mean squared error (RMSE)

Author(s)

Landon Sego


pnnl/qFeature documentation built on May 25, 2019, 10:22 a.m.