Learn R Programming

IPV (version 0.2.0)

input_excel: Input Excel

Description

Reads excel files containing factor loadings and latent correlations for IPV charts.

Usage

input_excel(global = NULL, tests)

Value

List containing formatted data including center distances for

item_chart, facet_chart, and

nested_chart.

Arguments

global

character; name of the excel file containing factor loadings from the global level and the test level, and latent correlations from the test level.

tests

character; name(s) of the excel file(s) containing factor loadings from the test level and the facet level, and latent correlations from the facet level.

Details

Note that the excel files need a very specific structure. Use the example files as templates.

The global argument defaults to NULL. This allows to only use the tests argument, resulting in a simple model with one test and its facets.

If you specify an element in tests as NA, this test will be treated as having no facets.

Examples

Run this code
# read data for a simple model by ignoring the "global" parameter of
# input_excel
single_file <- system.file(
  "extdata",
  "DSSEI.xlsx",
  package = "IPV",
  mustWork = TRUE)
x <- input_excel(tests = single_file)

# read data for a nested model
# the estimates need to be split into several excel files as in the example
global <- system.file(
  "extdata",
  "IPV_global.xlsx",
  package = "IPV",
  mustWork = TRUE)
tests <- c(
  system.file(
    "extdata",
    "IPV_DSSEI.xlsx",
    package = "IPV",
    mustWork = TRUE),
  system.file(
    "extdata",
    "IPV_SMTQ.xlsx",
    package = "IPV",
    mustWork = TRUE),
  system.file(
    "extdata",
    "IPV_RSES.xlsx",
    package = "IPV",
    mustWork = TRUE))
x <- input_excel(global = global, tests = tests)

Run the code above in your browser using DataLab