mcor: Multiple correlation

View source: R/mcor.R

mcorR Documentation

Multiple correlation

Description

Function calculates multiple correlation between y and x, constructing a linear regression model

Usage

mcor(x, y, use = c("na.or.complete", "complete.obs", "everything",
  "all.obs"))

Arguments

x

Either data.frame or a matrix

y

The numerical variable.

use

What observations to use. See cor function for details. The only option that is not available here is "pairwise.complete.obs".

Details

This is based on the linear regression model with the set of variables in x. The returned value is just a coefficient of multiple correlation from regression, the F-statistics of the model (thus testing the null hypothesis that all the parameters are equal to zero), the associated p-value and the degrees of freedom.

See details in the vignette "Marketing analytics with greybox": vignette("maUsingGreybox","greybox")

Value

The following list of values is returned:

  • valueThe value of the coefficient;

  • statisticThe value of F-statistics associated with the parameter;

  • p.valueThe p-value of F-statistics associated with the parameter;

  • df.residualThe number of degrees of freedom for the residuals;

  • dfThe number of degrees of freedom for the data.

Author(s)

Ivan Svetunkov, ivan@svetunkov.ru

See Also

table, tableplot, spread, cramer, association

Examples


mcor(mtcars$am, mtcars$mpg)


greybox documentation built on Sept. 16, 2023, 9:07 a.m.