myLinearRegression: Produce a ggpair plot Y vs less than 5 columns & output...

Description Usage Arguments Value Examples

View source: R/myLinearRegression.R

Description

This function produces a ggpair plot using GGally pakage for the column Y vs the columns presented in in the matrix X. It will subset for the rows only presented on sub parameter. It will also produce the coefficients and p-value for the linear model fit.

Usage

1
myLinearRegression(X = X, Y = Y, sub = sub)

Arguments

X

is a matrix.

Y

a vector representing the response.

sub

a vector representing the number of rows from the matrix. Number of sub should match Y.

Value

ggpair plot, coef and p-value.

Examples

1
2
X = matrix(runif(100),nrow=20,ncol=4,byrow = TRUE)
myLinearRegression(X=X,Y=c(152,266,341,148,242,264,544,279,488,62),sub=c(2,3,4,15,12,9,7,18,19,20))

bineyamtafesse/myLinearRegression documentation built on Dec. 31, 2020, 8:54 p.m.