input_manual_simple: Input Manual Simple

Description Usage Arguments Details Value See Also Examples

View source: R/input_manual_simple.R

Description

Generates manual data input for a simple model with one test.

Usage

1
2
3
input_manual_simple(test_name, facet_names, items_per_facet,
  item_names = NULL, general_loadings = NULL, correlated_loadings = NULL,
  correlation_matrix = NULL)

Arguments

test_name

character; the name of the test.

facet_names

character; the names of the facets in correct order.

items_per_facet

integer; number of items per facet in correct order (determined by facet_names), if all facets have the same number of items a single number can be used.

item_names

character or integer; the names of the items in correct order (determined by facet_names); defaults to NULL, in this case the items will be ennumerated.

general_loadings

integer; vector of the items' loadings on the general factor (test) in correct order (determined by item_names); defaults to NULL, in this case complete by hand.

correlated_loadings

integer; vector of the items' loadings on their correlated factor (facet) in correct order (determined by item_names); defaults to NULL, in this case complete by hand.

correlation_matrix

matrix containing the latent correlations between facets, pay attention to the order of rows and columns, which is determined by facet_names; defaults to NULL, in this case complete by hand.

Details

Pay attention to the order of facets and items, it has to be coherent throughout the whole data. facet_names and items_per_facet determine which facet is listed first and how many items there are listed for that facet. item_names, general_loadings and correlated_loadings have to match that order. The correlation matrix uses the order in facet_names for rows and columns.

Check the output for correctness and complete missing data before continuing with input_manual_process!

Value

list containing raw data, that needs to be preprocessed using input_manual_process.

See Also

input_manual_nested input_manual_process

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
# these RSES data can also be seen in self_confidence, the example data of
# this package
mydata <- input_manual_simple(
test_name = "RSES",
facet_names = c("Ns", "Ps"),
items_per_facet = 5,
item_names = c(2, 5, 6, 8, 9,
              1, 3, 4, 7, 10),
general_loadings = c(.5806, .5907, .6179, .5899, .6559,
                    .6005, .4932, .4476, .5033, .6431),
correlated_loadings = c(.6484, .6011, .6988, .6426, .6914,
                       .6422, .5835, .536, .5836, .6791),
correlation_matrix = matrix(data = c(1, .69,
                                    .69, 1),
                           nrow = 2,
                           ncol = 2))
mydata
input_manual_process(mydata)

NilsPetras/IPV documentation built on Dec. 7, 2018, 8:55 a.m.