adddat: Add data to cnqr object

Description Usage Arguments Value Note

View source: R/from_cnqr-adddat.cnqr.R

Description

Add more data to a 'cnqr' object.

Usage

1
2
3
4
## S3 method for class 'cnqr'
adddat(obj, dat, QY = NULL)

adddat(obj, dat, QY = NULL)

Arguments

obj

Object of type 'cnqr' that you wish to add data to. See cnqr::cnqr().

dat

A list of data frames/matrices (of the raw data) to add to obj. Or, a single data frame/matrix if there's only one.

QY

List of quantile functions of length matching the number of data matrices in dat (or a single quantile function if there's only one data matrix). NULL if you'd like to use the quantile function in obj – in which case the response data are stationary.

Value

The original 'cnqr' object obj, with the $y, $uind, $yhat, $score, and possibly $QY (if non-stationary) entries extended to include the new data.

Note

If dat is a named list (and not a matrix), then the data added to the 'cnqr' object will also have those names. Otherwise, In the outputted 'cnqr' object, the added data will have names 'dat' with the data number beside it. So for example, if obj contains two data sets, and you want to add two more unnamed data sets, they'll be named 'dat3' and 'dat4'.

This function is useful for cutting down on computation time. Particularly, it helps so that the independent predictors are only needed to be computed once.


vincenzocoia/cmc documentation built on Nov. 18, 2019, 12:04 a.m.