Learn R Programming

NCA (version 2.0)

nca: Run a basic NCA analyses on a data set

Description

Run a basic NCA analyses on a data set

Usage

nca(data, x, y, ceilings=c("ols", "ce_fdh", "cr_fdh"))

Arguments

data

dataframe with columns of the variables

x

collection of the columns with the independent variables

y

index or name of the column with the dependent variable

ceilings

vector with the method types to include in this analysis

Value

Returns a list with 3 items (see examples for further explanation):

plots

A list of plot-data each x-y combination

summaries

A list of dataframes with the summaries for each x-y combination

bottlenecks

A list of dataframes with a bottleneck table for each ceiling technique

Examples

Run this code
# NOT RUN {
  # Load the data
  data(nca.example)
  data <- nca.example

  # Basic usage of the nca analysis
  # Independent variables in the first 2 columns, dependent variable in the third column
  # This shows scatter plot(s) with the ceiling lines and the effect size(s) on the console
  nca(data, c(1, 2), 3)

  # Columns can be selected by name as well
  nca(data, c("Individualism", "Risk taking"), "Innovation performance")

  # Define the ceiling techniques via the ceilings parameter
  nca(data, c(1, 2), 3, ceilings=c("ols", "ce_vrs"))
  # These are the available ceiling techniques
  print(ceilings)
# }

Run the code above in your browser using DataLab