determinantStructure: Determinant Structure specification

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/determinantStructure.R

Description

These functions can be used to specify a determinant structure: a hierarchical structure of determinants that can then be conveniently plotted and analysed, for example using detStructCIBER.

These functions are made to be used together; see the example and the forthcoming article for more information.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
determinantStructure(name, selection = NULL, ...)

determinantVar(name, selection = NULL, ...)

subdeterminants(name, selection = NULL, ...)

subdeterminantProducts(name, selection = NULL, ...)

## S3 method for class 'determinantStructure'
print(x, ...)
## S3 method for class 'determinantStructure'
plot(x, useDiagrammeR = FALSE, ...)

Arguments

name

The name of the variable that is specified.

selection

A regular expression to use to select the variables in a dataframe that are considered items that together form this variable. For determinantStructure, a list can be provided that also contains a named regular expression with the name 'behaviorRegEx', which specifies the name of the behavior to which this determinant structure pertains.

x

The determinantStructure object to print or plot.

useDiagrammeR

Whether to simply use print(plot(x)) (if FALSE) or whether to use ToDiagrammeRGraph, tweak it a bit, by setting global graph attributes, and then using render_graph (if TRUE).

...

Any additional arguments are other determinant structure building functions. These are used to construct the determinant structure 'tree'.

Details

This family of functions will be explained more in detail in a forthcoming paper.

plot and print methods plot and print a determinantStructure object.

Value

A determinantStructure object, which is a data.tree object.

Author(s)

Gjalt-Jorn Peters

Maintainer: Gjalt-Jorn Peters <gjalt-jorn@userfriendlyscience.com>

References

(Forthcoming)

See Also

detStructAddVarLabels, detStructAddVarNames, detStructComputeProducts, detStructComputeScales, detStructCIBER

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
determinantStructure('using R',
                     list('using R',
                          behaviorRegEx = 'some RegEx'),
                     determinantVar("Intention",
                                    "another RegEx",
                                    determinantVar("Attitude",
                                                   "third RegEX",
                                                   subdeterminants("Likelihood",
                                                                   "4th RegEx"),
                                                  subdeterminants("Evaluation",
                                                                  "5th RegEx"),
                                                  subdeterminantProducts("attProduct",
                                                                         c("4th RegEx",
                                                                           "5th RegEx"))),
                                    determinantVar("perceivedNorm",
                                                   "6th RegEx",
                                                   subdeterminants("Approval",
                                                                   "7th RegEx"),
                                                   subdeterminants("Motivation to comply",
                                                                   "8th RegEx"),
                                                   subdeterminantProducts("normProduct",
                                                                          c("7th RegEx",
                                                                            "8th RegEx"))),
                                              determinantVar("pbc",
                                                             "9th RegEx",
                                                             subdeterminants("Control beliefs",
                                                                             "10th RegEx"))));

Example output

Registered S3 method overwritten by 'GGally':
  method from   
  +.gg   ggplot2
Registered S3 methods overwritten by 'lme4':
  method                          from
  cooks.distance.influence.merMod car 
  influence.merMod                car 
  dfbeta.influence.merMod         car 
  dfbetas.influence.merMod        car 
                          levelName
1  using R                         
2   °--Intention                   
3       ¦--Attitude                
4       ¦   ¦--Likelihood          
5       ¦   ¦--Evaluation          
6       ¦   °--attProduct          
7       ¦--perceivedNorm           
8       ¦   ¦--Approval            
9       ¦   ¦--Motivation to comply
10      ¦   °--normProduct         
11      °--pbc                     
12          °--Control beliefs     

userfriendlyscience documentation built on May 2, 2019, 1:09 p.m.