make.ncpen.data: Create ncpen Data Structure Using a Formula

Description Usage Arguments Value Author(s) Examples

View source: R/ncpen_util.R

Description

This function creates ncpen y vector and x matrix from data using formula.

Usage

1

Arguments

formula

(formula) regression formula. Intercept will not be created.

data

(numeric matrix or data.frame) contains both y and X.

Value

List of y vector and x matrix.

y.vec

y vector

x.mat

x matrix

Author(s)

Dongshin Kim, Sunghoon Kwon, Sangin Lee

Examples

1
2
3
data = data.frame(y = 1:5, x1 = 6:10, x2 = 11:15);
formula = log(y) ~ log(x1) + x2;
make.ncpen.data(formula, data);

ncpen documentation built on May 1, 2019, 9:21 p.m.