inferenceDataObjectBuilder {fdaPDE}R Documentation

Constructor for inferenceDataObject class

Description

A function that build an inferenceDataObject. In the process of construction many checks over the input parameters are carried out so that the output is a well defined object, that can be used as parameter in smooth.FEM or smooth.FEM.time functions. Notice that this constructor ensures well-posedness of the object, but a further check on consistency with the smoothing functions parameters will be carried out.

Usage

inferenceDataObjectBuilder(test = NULL, 
interval = NULL, 
type = 'w', 
component = 'parametric',
dim = NULL, 
n_cov = NULL,
locations = NULL,
locations_indices = NULL,
locations_by_nodes = FALSE,
coeff = NULL, 
beta0 = NULL, 
f0 = NULL,
f_var = FALSE,
level = 0.95,
n_flip = 1000)

Arguments

test

A string defining the type of test to be performed. Multiple tests can be required. In this case the length of the list needs to be coherent with the ones of type, component and interval. The default is NULL, and can take values:

'oat'

: one-at-the-time tests, available only when component is 'parametric'.

'sim'

: simultaneous tests.

'none'

: no test required. interval must be set.

interval

A string defining the type of confidence intervals to be computed. Multiple intervals can be required. In this case the length of the list needs to be coherent with the ones of type, component and test. The default is NULL, and can take values:

'oat'

: one-at-the-time intervals.

'sim'

: simultaneous intervals, available only when component is 'parametric' and no sign-flipping approaches are required.

'bonf'

: Bonferroni intervals, available only when component is 'parametric'

'none'

: no interval required. test must be set.

type

A list of strings defining the type of implementation for the inferential analysis. The possible values are:

'w'

: Wald parametric approach (default).

's'

: Speckman parametric approach.

'sf'

: sign-flip nonparametric approach.

'esf'

: eigen-sign-flip nonparametric approach.

'enh-esf'

: enhanced-eigen-sign-flip nonparametric approach.

component

A list of strings defining on which model component inference has to be performed. It can take values 'parametric' (default), 'nonparametric' or 'both'.

dim

Dimension of the problem, defaulted to NULL. It can take value 2 or 3 corresponding to 1.5D/2D or 2.5D/3D problems (Must be set by the user)

n_cov

Number of the covariates, defaulted to NULL. (Must be set by the user)

locations

A matrix of the locations of interest when testing the nonparametric component f, defaulted to NULL

locations_indices

A vector of indices indicating the locations to be considered among the observed ones for nonparametric inference, defaulted to NULL. If a vector of indices is provided, then the slot 'locations' is discarded.

locations_by_nodes

A logical used to indicate whether the selected locations to perform inference on f are all coinciding with the nodes;

coeff

A matrix, with n_cov number of columns, of numeric coefficients representing the linear combinations of the parametric components of the model. The default is NULL, corresponding to an identity matrix. If at least one sing-flipping approach is required in type, needs to be an identity matrix.

beta0

Vector of real numbers (default NULL). It is used only if the test parameter is set, and component is not 'nonparametric'; its length is the number of rows of matrix coeff if provided. If test is set and beta0 is NULL, will be set to a vector of zeros.

f0

A function object representing the expression of the nonparametric component f under the null hypothesis. Taken into account if test is set and component is not parametric. If NULL, the default is the null function, hence a test on the significance of the nonparametric component is carried out.

f_var

A logical used to decide whether to estimate the local variance of the nonlinear part of the model. The possible values are: FALSE (default) and TRUE.

level

A vector containing the level of significance used to compute quantiles for confidence intervals, defaulted to 0.95. It is taken into account only if interval is set.

n_flip

Number of flips performed in sign-flipping approaches, defaulted to 1000.

Value

The output is a well defined inferenceDataObject, that can be used as input parameter in the smooth.FEM function.

Examples

obj<-inferenceDataObjectBuilder(test = 'oat', dim = 2, beta0 = rep(1,4), n_cov = 4);
obj2<-inferenceDataObjectBuilder(test = 'sim', dim = 3, component = 'nonparametric', n_cov = 3);

[Package fdaPDE version 1.1-19 Index]