psychotools: Interfaces for psychotools package for data science...

Description Usage Arguments Details Value Author(s) Examples

Description

Interfaces to psychotools functions that can be used in a pipeline implemented by magrittr.

Usage

1
2

Arguments

data

data frame, tibble, list, ...

...

Other arguments passed to the corresponding interfaced function.

Details

Interfaces call their corresponding interfaced function.

Value

Object returned by interfaced function.

Author(s)

Roberto Bertolusso

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
## Not run: 
library(intubate)
library(magrittr)
library(psychotools)


## ntbt_anchor: Anchor Methods for the Detection of Uniform DIF the Rasch Model
data("VerbalAggression", package = "psychotools")

## Original function to interface
anchor(resp2[, 1:12] ~ gender, data = VerbalAggression,
       class = "forward", select = "MTT", range = c(0.05, 1))

## The interface puts data as first parameter
ntbt_anchor(VerbalAggression, resp2[, 1:12] ~ gender, 
            class = "forward", select = "MTT", range = c(0.05, 1))

## so it can be used easily in a pipeline.
VerbalAggression %>%
  ntbt_anchor(resp2[, 1:12] ~ gender, 
              class = "forward", select = "MTT", range = c(0.05, 1))


## ntbt_anchortest: Anchor methods for the detection of uniform DIF the Rasch model

## Original function to interface
anchortest(resp2[, 1:12] ~ gender, data = VerbalAggression,
           class = "forward", select = "MTT", range = c(0.05, 1))

## The interface puts data as first parameter
ntbt_anchortest(VerbalAggression, resp2[, 1:12] ~ gender,
                class = "forward", select = "MTT", range = c(0.05, 1))

## so it can be used easily in a pipeline.
VerbalAggression %>%
  ntbt_anchortest(resp2[, 1:12] ~ gender,
                  class = "forward", select = "MTT", range = c(0.05, 1))

## End(Not run)

Example output

Loading required namespace: multcomp
Anchor items:
[1]  3  9  5  1  6  4 10

Ranking order:
 [1]  7  3  9  5  1  6  4 10 12  2  8 11

Criterion values (not sorted):
 [1]  6  9  6  7  6  6  5  9  6  9 10  9
Anchor items:
[1] 9 5 1 3 6 4 2

Ranking order:
 [1]  7  9  5  1  3  6  4  2  8 10 12 11

Criterion values (not sorted):
 [1]  6  9  6  7  6  6  5  9  6  9 10  9
Anchor items:
[1] 1 5 9 6 3 4 2

Ranking order:
 [1]  7  1  5  9  6  3  4  2  8 12 10 11

Criterion values (not sorted):
 [1]  6  9  6  7  6  6  5  9  6  9 10  9
Anchor items:
[1]  5  3  1  6  9  4 10

Anchored item parameters:
`resp2[, 1:12]`S1WantCurse_1   `resp2[, 1:12]`S1DoCurse_1 
                 -1.09813262                  -0.93463721 
`resp2[, 1:12]`S1WantScold_1   `resp2[, 1:12]`S1DoScold_1 
                 -0.39548331                   0.04885082 
  `resp2[, 1:12]`S1DoShout_1 `resp2[, 1:12]`S2WantCurse_1 
                  1.26467752                  -1.70260511 
  `resp2[, 1:12]`S2DoCurse_1 `resp2[, 1:12]`S2WantScold_1 
                 -0.42040437                  -0.57109738 
  `resp2[, 1:12]`S2DoScold_1 `resp2[, 1:12]`S2WantShout_1 
                  0.62824492                   0.04885082 
  `resp2[, 1:12]`S2DoShout_1 `resp2[, 1:12]`S1WantCurse_2 
                  2.16336265                  -0.69043430 
  `resp2[, 1:12]`S1DoCurse_2 `resp2[, 1:12]`S1WantScold_2 
                 -1.24162833                  -0.03772488 
  `resp2[, 1:12]`S1DoScold_2   `resp2[, 1:12]`S1DoShout_2 
                 -0.69043427                   1.45966568 
`resp2[, 1:12]`S2WantCurse_2   `resp2[, 1:12]`S2DoCurse_2 
                 -1.04784139                  -1.45047608 
`resp2[, 1:12]`S2WantScold_2   `resp2[, 1:12]`S2DoScold_2 
                 -0.11699075                  -0.43928734 
`resp2[, 1:12]`S2WantShout_2   `resp2[, 1:12]`S2DoShout_2 
                  1.09471060                   1.87448368 

Ranking order:
 [1]  7  5  3  1  6  9  4 10 12  8  2 11

Criterion values (not sorted):
 [1]  6  9  6  7  6  6  5  9  6  9 10  9

Final DIF tests:

	 Simultaneous Tests for General Linear Hypotheses

Linear Hypotheses:
                                Estimate Std. Error z value Pr(>|z|)    
`resp2[, 1:12]`S1WantCurse == 0  -0.4077     0.3132  -1.302 0.193053    
`resp2[, 1:12]`S1DoCurse == 0     0.3070     0.3812   0.805 0.420688    
`resp2[, 1:12]`S1WantScold == 0  -0.3578     0.3003  -1.191 0.233477    
`resp2[, 1:12]`S1DoScold == 0     0.7393     0.3088   2.394 0.016646 *  
`resp2[, 1:12]`S1DoShout == 0    -0.1950     0.3323  -0.587 0.557376    
`resp2[, 1:12]`S2WantCurse == 0  -0.6548     0.3823  -1.713 0.086795 .  
`resp2[, 1:12]`S2DoCurse == 0     1.0301     0.3907   2.637 0.008371 ** 
`resp2[, 1:12]`S2WantScold == 0  -0.4541     0.3013  -1.507 0.131804    
`resp2[, 1:12]`S2DoScold == 0     1.0675     0.3058   3.491 0.000481 ***
`resp2[, 1:12]`S2WantShout == 0  -1.0459     0.3600  -2.905 0.003674 ** 
`resp2[, 1:12]`S2DoShout == 0     0.2889     0.4239   0.681 0.495595    
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
(Univariate p values reported)

Anchor items:
[1] 1 9 5 6 3 4 2

Anchored item parameters:
  `resp2[, 1:12]`S1DoCurse_1 `resp2[, 1:12]`S1WantScold_1 
                -0.711368331                 -0.172214434 
  `resp2[, 1:12]`S1DoScold_1 `resp2[, 1:12]`S1WantShout_1 
                 0.272119692                  0.346208928 
  `resp2[, 1:12]`S1DoShout_1 `resp2[, 1:12]`S2WantCurse_1 
                 1.487946396                 -1.479336230 
  `resp2[, 1:12]`S2DoCurse_1 `resp2[, 1:12]`S2WantScold_1 
                -0.197135499                 -0.347828506 
  `resp2[, 1:12]`S2DoScold_1 `resp2[, 1:12]`S2WantShout_1 
                 0.851513801                  0.272119692 
  `resp2[, 1:12]`S2DoShout_1   `resp2[, 1:12]`S1DoCurse_2 
                 2.386631529                 -1.127008193 
`resp2[, 1:12]`S1WantScold_2   `resp2[, 1:12]`S1DoScold_2 
                 0.076895265                 -0.575814129 
`resp2[, 1:12]`S1WantShout_2   `resp2[, 1:12]`S1DoShout_2 
                 0.629825996                  1.574285825 
`resp2[, 1:12]`S2WantCurse_2   `resp2[, 1:12]`S2DoCurse_2 
                -0.933221244                 -1.335855934 
`resp2[, 1:12]`S2WantScold_2   `resp2[, 1:12]`S2DoScold_2 
                -0.002370609                 -0.324667202 
`resp2[, 1:12]`S2WantShout_2   `resp2[, 1:12]`S2DoShout_2 
                 1.209330739                  1.989103817 

Ranking order:
 [1]  7  1  9  5  6  3  4  2 12  8 10 11

Criterion values (not sorted):
 [1]  6  9  6  7  6  6  5  9  6  9 10  9

Final DIF tests:

	 Simultaneous Tests for General Linear Hypotheses

Linear Hypotheses:
                                Estimate Std. Error z value Pr(>|z|)    
`resp2[, 1:12]`S1DoCurse == 0    0.41564    0.32998   1.260 0.207820    
`resp2[, 1:12]`S1WantScold == 0 -0.24911    0.30085  -0.828 0.407661    
`resp2[, 1:12]`S1DoScold == 0    0.84793    0.30912   2.743 0.006087 ** 
`resp2[, 1:12]`S1WantShout == 0 -0.28362    0.30264  -0.937 0.348677    
`resp2[, 1:12]`S1DoShout == 0   -0.08634    0.33397  -0.259 0.796001    
`resp2[, 1:12]`S2WantCurse == 0 -0.54611    0.38200  -1.430 0.152828    
`resp2[, 1:12]`S2DoCurse == 0    1.13872    0.39053   2.916 0.003547 ** 
`resp2[, 1:12]`S2WantScold == 0 -0.34546    0.30179  -1.145 0.252342    
`resp2[, 1:12]`S2DoScold == 0    1.17618    0.35331   3.329 0.000871 ***
`resp2[, 1:12]`S2WantShout == 0 -0.93721    0.36109  -2.595 0.009446 ** 
`resp2[, 1:12]`S2DoShout == 0    0.39753    0.42546   0.934 0.350123    
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
(Univariate p values reported)

Anchor items:
[1] 5 6 3 9 1 4 8

Anchored item parameters:
`resp2[, 1:12]`S1WantCurse_1   `resp2[, 1:12]`S1DoCurse_1 
                 -0.94832558                  -0.78483016 
`resp2[, 1:12]`S1WantScold_1   `resp2[, 1:12]`S1DoScold_1 
                 -0.24567627                   0.19865786 
  `resp2[, 1:12]`S1DoShout_1 `resp2[, 1:12]`S2WantCurse_1 
                  1.41448456                  -1.55279806 
  `resp2[, 1:12]`S2DoCurse_1 `resp2[, 1:12]`S2WantScold_1 
                 -0.27059733                  -0.42129034 
  `resp2[, 1:12]`S2DoScold_1 `resp2[, 1:12]`S2WantShout_1 
                  0.77805197                   0.19865786 
  `resp2[, 1:12]`S2DoShout_1 `resp2[, 1:12]`S1WantCurse_2 
                  2.31316970                  -0.54597876 
  `resp2[, 1:12]`S1DoCurse_2 `resp2[, 1:12]`S1WantScold_2 
                 -1.09717280                   0.10673066 
  `resp2[, 1:12]`S1DoScold_2   `resp2[, 1:12]`S1DoShout_2 
                 -0.54597874                   1.60412122 
`resp2[, 1:12]`S2WantCurse_2   `resp2[, 1:12]`S2DoCurse_2 
                 -0.90338585                  -1.30602054 
`resp2[, 1:12]`S2WantScold_2   `resp2[, 1:12]`S2DoScold_2 
                  0.02746478                  -0.29483181 
`resp2[, 1:12]`S2WantShout_2   `resp2[, 1:12]`S2DoShout_2 
                  1.23916613                   2.01893921 

Ranking order:
 [1]  7  5  6  3  9  1  4  8 12  2 10 11

Criterion values (not sorted):
 [1]  6  9  6  7  6  6  5  9  6  9 10  9

Final DIF tests:

	 Simultaneous Tests for General Linear Hypotheses

Linear Hypotheses:
                                Estimate Std. Error z value Pr(>|z|)   
`resp2[, 1:12]`S1WantCurse == 0  -0.4023     0.3135  -1.284  0.19931   
`resp2[, 1:12]`S1DoCurse == 0     0.3123     0.3812   0.819  0.41258   
`resp2[, 1:12]`S1WantScold == 0  -0.3524     0.3011  -1.170  0.24188   
`resp2[, 1:12]`S1DoScold == 0     0.7446     0.3093   2.408  0.01605 * 
`resp2[, 1:12]`S1DoShout == 0    -0.1896     0.3342  -0.567  0.57038   
`resp2[, 1:12]`S2WantCurse == 0  -0.6494     0.3823  -1.699  0.08935 . 
`resp2[, 1:12]`S2DoCurse == 0     1.0354     0.3381   3.063  0.00219 **
`resp2[, 1:12]`S2WantScold == 0  -0.4488     0.3021  -1.486  0.13740   
`resp2[, 1:12]`S2DoScold == 0     1.0729     0.3534   3.036  0.00240 **
`resp2[, 1:12]`S2WantShout == 0  -1.0405     0.3614  -2.879  0.00398 **
`resp2[, 1:12]`S2DoShout == 0     0.2942     0.4256   0.691  0.48935   
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
(Univariate p values reported)

intubate documentation built on May 2, 2019, 2:46 p.m.