input_manual_nested: Input Manual Nested

Description Usage Arguments Details Value See Also Examples

View source: R/input_manual_nested.R

Description

Generates manual data input for a nested model with several tests.

Usage

1
2
3
input_manual_nested(title, test_names, items_per_test, item_names = NULL,
  general_loadings = NULL, correlated_loadings = NULL,
  correlation_matrix = NULL)

Arguments

title

character; the name of the overall construct.

test_names

character; the names of the tests in correct order.

items_per_test

integer; number of items per test in correct order (determined by test_names), if all tests 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 test_names); defaults to NULL, in this case the items will be ennumerated.

general_loadings

integer; vector of the items' loadings on the general factor (overall construct) 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 (test) in correct order (determined by item_names); defaults to NULL, in this case complete by hand.

correlation_matrix

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

Details

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

This function only lists the name of the tests in output$tests. For each of those tests, the data on the facets needs to be added using input_manual_simple.

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

Value

list containing raw data. The data on the facets of the tests needs to be added using input_manual_simple. Afterwards, the whole data needs to be preprocessed using input_manual_process.

See Also

input_manual_simple input_manual_process

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# these data can also be seen in self_confidence, the example data of
# this package
mydata <- input_manual_nested(
title = "Self-Confidence",
test_names = c("DSSEI", "SMTQ", "RSES"),
items_per_test = c(20, 14, 10),
item_names = c(
 1,  5,  9, 13, 17, # DSSEI
 3,  7, 11, 15, 19, # DSSEI
 16,  4, 12,  8, 20, # DSSEI
 2,  6, 10, 14, 18, # DSSEI
 11, 13, 14,  1,  5,  6, # SMTQ
 3, 10, 12,  8, # SMTQ
 7,  2,  4,  9, # SMTQ
 1,  3,  4,  7, 10, # RSES
 2,  5,  6,  8,  9), # RSES
general_loadings = c(
 .5189, .6055, .618,  .4074, .4442,
 .5203, .2479, .529,  .554,  .5144,
 .3958, .5671, .5559, .4591, .4927,
 .3713, .5941, .4903, .5998, .6616,
 .4182, .2504, .4094, .3977, .5177, .4603,
 .3271,  .261, .3614, .4226,
 .2076, .3375, .5509, .3495,
 .5482, .4627, .4185, .4185, .5319,
 .4548, .4773, .4604, .4657, .4986),
correlated_loadings = c(
 .5694, .6794, .6615, .4142, .4584, # DSSEI
 .5554, .2165, .5675, .5649, .4752, # DSSEI
 .443 , .6517, .6421, .545 , .5266, # DSSEI
 .302 , .6067, .5178, .5878, .6572, # DSSEI
 .4486, .3282, .4738, .4567, .5986, .5416, # SMTQ
 .3602, .2955, .3648, .4814, # SMTQ
 .2593, .4053, .61  , .4121, # SMTQ
 .6005, .4932, .4476, .5033, .6431, # RSES
 .5806, .5907, .6179, .5899, .6559), # RSES
correlation_matrix = matrix(data = c(  1, .73, .62,
                                      .73,   1, .75,
                                      .62, .75,   1),
                           nrow = 3,
                           ncol = 3))
mydata

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