# CTTvis

You can load the package with the following command:

    library(CTTvis)

To demonstrate the `difficulty_plot` and `point_biserial_plot` functions, we will first load a built-in dataset called `dichotomous_response`.

In some context, item difficulty flag thresholds may change. This can be adjusted using the `easyFlag` and `hardFlag` arguments. The following use the easy flag threshold of .8, meaning that items that gets answered correctly 80% of the total test takers or greater are considered easy. On the other hand, items that gets answered correctly 60% of the total test takers or less are considered difficult.

    data(dichotomous_response)

    difficulty_plot(responses = dichotomous_response, title = "Item Difficulty Plot", easyFlag = .80, hardFlag = .60)

    #>    item difficulty
    #> 1     1       0.18
    #> 2     2       0.25
    #> 3     3       0.36
    #> 4     4       0.40
    #> 5     5       0.55
    #> 6     6       0.61
    #> 7     7       0.65
    #> 8     8       0.77
    #> 9     9       0.89
    #> 10   10       0.95

For the `point_biserial_plot` function, you could adjust your point-biserial correlation (pBis) threshold as well. For example, if you want the pBis threshold to be .3, you could configure the `pBis_threshold` as follows:

    point_biserial_plot(responses = dichotomous_response, title = "Item Discrimination Plot", pBis_threshold = 0.30)

    #>    item point_biserial
    #> 7     7   -0.088449033
    #> 2     2   -0.071905937
    #> 4     4   -0.070874141
    #> 3     3   -0.033280128
    #> 8     8   -0.031419150
    #> 9     9   -0.001983515
    #> 10   10    0.010543594
    #> 1     1    0.026049479
    #> 6     6    0.033705589
    #> 5     5    0.096957707

To demonstrate the `coefficient_alpha_plot` function, we need to load another built-in dataset called `reliability_df`. This dataset was simulated to test the capability of this function.

The influence of an item when dropped to the overall unidimensional coefficient alpha could vary, hence the option to configure the rounding of overall coefficient alpha. For example, if dropping an item increases the overall coefficient alpha by 0.001, then rounding the alpha by three decimal places could allow researchers to see the increase compared to rounding the alpha by two decimal points.

The following demonstration rounds the overall alpha by four decimal points. This argument can be adjusted based on the researchers’ needs.

    data(reliability_df)

    coefficient_alpha_plot(responses = reliability_df, title = "Coefficient Alpha Plot", alpha_round = 4)

    #>    item alpha_if_dropped
    #> 10   10        0.8351387
    #> 7     7        0.8356712
    #> 4     4        0.8361394
    #> 2     2        0.8369789
    #> 9     9        0.8395693
    #> 8     8        0.8404195
    #> 3     3        0.8432048
    #> 6     6        0.8432048
    #> 5     5        0.8499367
    #> 1     1        0.8517409