RealData: Generate data format from real data to do further analysis.

Description Usage Arguments Author(s) References Examples

Description

This function is to generate data format from real data to do further analysis.

Usage

1
RealData(x, y)

Arguments

x

input data x

y

input data y

Author(s)

Bingwen Zhang

References

Bingwen Zhang, Jun Geng and Lifeng Lai, Detecting changes in regression models via sparse group lasso, http://users.wpi.edu/~bzhang/icassp_v1.pdf

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
##---- Should be DIRECTLY executable !! ----
##-- ==>  Define data, use random,
##--	or do  help(data=index)  for the standard data sets.

## The function is currently defined as
function (x, y) 
{
    n <- dim(x)[1]
    p <- dim(x)[2]
    XTilde <- matrix(NA, n, np)
    for (i in 1:n) {
        for (j in 1:i) {
            XTilde[i, ((j - 1) * p + 1):(j * p)] <- x[i, ]
        }
    }
    data <- list(x = XTilde, y = y)
    return(data)
  }

boris109able/ChangePointCalc documentation built on May 13, 2019, 12:34 a.m.