Learn R Programming

ncpen (version 1.0.0)

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

Description

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

Usage

make.ncpen.data(formula, data)

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

Examples

Run this code
# NOT RUN {
data = data.frame(y = 1:5, x1 = 6:10, x2 = 11:15);
formula = log(y) ~ log(x1) + x2;
make.ncpen.data(formula, data);

# }

Run the code above in your browser using DataLab