Learn R Programming

QRFCCA (version 1.0)

fourier.expansion: Fourier Expansion

Description

Calculate the fourier coefficients

Usage

fourier.expansion(x, n_of_basis, pos)

Arguments

x

Input data matrix. Each row represents the observations of a single individual. Each column represents the variables.

n_of_basis

Number of basis function for Fourier expansion and it should be an odd number.

pos

The location or time information for each variables.

Value

The output is a list.

fbasis

The basis function

phi

The phase of the basis function based on the location or time information

coef

The calculated Fourier Coefficients

References

Lin N, Zhu Y, Fan R, Xiong M. A quadratically regularized functional canonical correlation analysis for identifying the global structure of pleiotropy with NGS data. PLOS Computational Biology. 2017;13(10):e1005788. doi: 10.1371/journal.pcbi.1005788.

See Also

fourier.expansion.smoothed

Examples

Run this code
# NOT RUN {
    data(snp_data);
    
# }
# NOT RUN {
     rlt = fourier.expansion(snp_data,n_of_basis=37,pos=as.numeric(colnames(snp_data));)
# }

Run the code above in your browser using DataLab