pls: Run partial least squares analysis

Description Usage Arguments Value Examples

View source: R/pls_func.R

Description

This is the main function of the plsr package. It will calculate a partial least squares solution for the provided data and perform permutation testing and bootstrapping on the resulting latent variables. Results will be saved as a plsr object.

Usage

1
2
pls(X, Y, n_perm = 100, n_boot = 100, scale = T, verbose = F,
  alpha = 0.05)

Arguments

X

A matrix of m observations on n_x variables.

Y

A matrix of m observations on n_y dimensions.

n_perm

Number of permutation iterations. Default is 100.

n_boot

Number of bootstrap iterations. Default is 100.

scale

Scaling of X and Y (Boolean).

verbose

Provides additional output.

alpha

The significance level for permutation testing.

Value

A plsr Object.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
X = matrix(rnorm(300), ncol = 3)
Y = matrix(rnorm(1000), ncol = 10)
pls(X,Y)
pls(X,Y, n_perm = 10, n_boot = 10)

#running pls function on included data of the package
plsr_obj=pls(rating_data,tracking_data,1000,1000)
#inspecting results:
plot(plsr_obj)
summary(plsr_obj)

plsr documentation built on May 1, 2019, 11:28 p.m.