FOBJ: Functional Objection

Description Usage Arguments Value Examples

View source: R/FOBJ.R

Description

FOBJ() is used to compute imformation for within FDA framework.

Usage

1
2
FOBJ(X, y, t, optns = list(smooth = FALSE, FVEthreshold = 99.99, a0 =
  0.02, M0 = 10, par.sig = 1000), weighted = FALSE)

Arguments

X

The input matrix of observed values. Rows represent repititions or samples, and columns represent observed time points.

y

The input vector of labels. ith element of this vector should correspond to the label of ith row of data matrix X.

t

An input time grid vector.

optns

A list to control computing such as smoothing, threshold and quantile range.

weighted

Whether weight for quantile loss is to be used. FALSE is default.

Value

It returns a class "FOBJ".

DataGroupby

The list group by the label of each group

y

Vector. Label of each group

t

Original time points of observation

K

Numeber. How many groups

phi

Matrix. The functional principle componants, listed by colums

scores

List. The projection scores of each group

cutPoints

Numebr. How many componants

quantlist

List. The quantile of projection scores of each group

tau

Vector. Quantile counter

weight

Matrix. Weight for classification. Default is matrix 1. The number of colums is equal to tau

optns

List. The same to the original optns

weighted

Logical. The same to the parameter "weighted"

propotion

Vector. Contains the proportion of variance of each FPC

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
rm(list = ls())
library(refund)
data(DTI)
X <- DTI$cca
y <- DTI$case
t <- seq(0, 1, length.out = ncol(X))
#not run
#datacheck(X, y, t)
allData <- cbind(X, y)
allData <- allData[which(DTI$visit == 1), ]
allData <- na.omit(allData)
y <- allData[, ncol(allData)]
X <- allData[, -ncol(allData)]
t <- seq(0, 1, length.out = ncol(X))
w1 <- FOBJ(X, y, t)

iantsuising/quickfun documentation built on Nov. 4, 2019, 1:52 p.m.