From f12815b8ace22916c50f56515293e7054267e3a9 Mon Sep 17 00:00:00 2001 From: Jeffrey Girard Date: Thu, 29 Nov 2018 11:20:01 -0500 Subject: [PATCH] Set pkgdown to release mode --- _pkgdown.yml | 2 +- docs/CODE_OF_CONDUCT.html | 28 +- docs/CONTRIBUTING.html | 28 +- docs/ISSUE_TEMPLATE.html | 30 +- docs/LICENSE.html | 140 ++-- docs/SUPPORT.html | 30 +- docs/articles/index.html | 28 +- docs/articles/intermediate-ssm-analysis.html | 467 +++++++------- .../introduction-to-ssm-analysis.html | 255 ++++---- docs/articles/using-instruments.html | 607 +++++++++--------- docs/authors.html | 34 +- docs/index.html | 77 +-- docs/news/index.html | 106 +-- docs/pkgdown.css | 10 +- docs/pkgdown.js | 10 +- docs/pkgdown.yml | 4 +- docs/reference/anchors.html | 28 +- docs/reference/aw2009.html | 28 +- docs/reference/circumplex-package.html | 37 +- docs/reference/csie.html | 30 +- docs/reference/csig.html | 30 +- docs/reference/csip.html | 30 +- docs/reference/csiv.html | 30 +- docs/reference/ggsave.html | 30 +- docs/reference/html_render.html | 28 +- docs/reference/igicr.html | 30 +- docs/reference/iip32.html | 30 +- docs/reference/iip64.html | 30 +- docs/reference/iipsc.html | 30 +- docs/reference/iis32.html | 113 ++-- docs/reference/iis64.html | 160 ++--- docs/reference/index.html | 28 +- docs/reference/instrument.html | 28 +- docs/reference/instruments.html | 28 +- docs/reference/ipipipc.html | 30 +- docs/reference/ipsatize.html | 76 +-- docs/reference/isc.html | 30 +- docs/reference/items.html | 28 +- docs/reference/jz2017.html | 28 +- docs/reference/mutate.html | 28 +- docs/reference/norms.html | 28 +- docs/reference/octants.html | 28 +- docs/reference/pipe.html | 28 +- docs/reference/poles.html | 28 +- docs/reference/quadrants.html | 28 +- docs/reference/raw_iipsc.html | 28 +- docs/reference/scales.html | 28 +- docs/reference/score.html | 66 +- docs/reference/select.html | 28 +- docs/reference/ssm_analyze.html | 34 +- docs/reference/ssm_append.html | 40 +- docs/reference/ssm_plot.html | 34 +- docs/reference/ssm_plot_circle.html | 28 +- docs/reference/ssm_plot_contrast.html | 28 +- docs/reference/ssm_table.html | 50 +- docs/reference/standardize.html | 62 +- docs/reference/tidyeval.html | 32 +- 57 files changed, 1723 insertions(+), 1699 deletions(-) diff --git a/_pkgdown.yml b/_pkgdown.yml index cf758c33..c3b1f90f 100644 --- a/_pkgdown.yml +++ b/_pkgdown.yml @@ -16,7 +16,7 @@ template: index_name: circumplex development: - mode: devel + mode: release reference: - title: Instrument Data diff --git a/docs/CODE_OF_CONDUCT.html b/docs/CODE_OF_CONDUCT.html index 83194702..fc159ee1 100644 --- a/docs/CODE_OF_CONDUCT.html +++ b/docs/CODE_OF_CONDUCT.html @@ -1,6 +1,6 @@ - + @@ -9,17 +9,17 @@ Contributor Code of Conduct • circumplex - + - + - + - + - + @@ -31,8 +31,7 @@ - - + @@ -44,7 +43,8 @@ - + + - + @@ -9,17 +9,17 @@ Contributing to circumplex • circumplex - + - + - + - + - + @@ -31,8 +31,7 @@ - - + @@ -44,7 +43,8 @@ - + + - + @@ -9,17 +9,17 @@ NA • circumplex - + - + - + - + - + @@ -31,8 +31,7 @@ - - + @@ -44,7 +43,8 @@ - + + - + @@ -9,17 +9,17 @@ GNU General Public License • circumplex - + - + - + - + - + @@ -31,8 +31,7 @@ - - + @@ -44,7 +43,8 @@ - + + - + @@ -9,17 +9,17 @@ Getting help with circumplex • circumplex - + - + - + - + - + @@ -31,8 +31,7 @@ - - + @@ -44,7 +43,8 @@ - + + - + @@ -9,17 +9,17 @@ Articles • circumplex - + - + - + - + - + @@ -31,8 +31,7 @@ - - + @@ -44,7 +43,8 @@ - + + + Intermediate SSM Analysis • circumplex - - - - - + + + + - @@ -25,14 +24,15 @@
@@ -590,29 +590,29 @@

Contrasts between groups’ means

To compare the mean profiles for females and males, we can start with the same syntax we had before and then add a contrast argument. For the sake of illustration, we will use a model contrast here, but for some purposes, a parameter contrast might be more appropriate.

-
results4 <- ssm_analyze(jz2017s, PA:NO, octants(), grouping = Gender, contrast = "model")
-summary(results4)
-#> Call:
-#> ssm_analyze(.data = jz2017s, scales = PA:NO, angles = octants(), 
-#>     grouping = Gender, contrast = "model")
-#> 
-#> Statistical Basis:    Mean Scores 
-#> Bootstrap Resamples:  2000 
-#> Confidence Level:     0.95 
-#> Listwise Deletion:    TRUE 
-#> Scale Displacements:  90 135 180 225 270 315 360 45 
-#> 
-#> Contrast [Male - Female]:
-#>                Estimate   Lower CI   Upper CI
-#> Elevation        -0.062     -0.120     -0.008
-#> X-Value          -0.232     -0.284     -0.182
-#> Y-Value           0.124      0.067      0.182
-#> Amplitude         0.263      0.212      0.320
-#> Displacement    151.858    140.481    163.702
-#> Model Fit         0.855
+

Note that the profile blocks we are used to have been replaced by a contrast block. By default, the contrast is made by subtracting the first level of the grouping variable from the second level (e.g., Male - Female). This provides an indication of the direction of the contrast. We can again generate a table and figure to display the results. Note that, because we used a model contrast, the figure will be a circular figure and not a contrast figure which we will see below. However, we would get a contrast figure if we used a parameter contrast.

-
ssm_table(results4)
- +
ssm_table(results4)
+
@@ -663,36 +663,36 @@

Mean-based Structural Summary Statistic Contrasts with 95% CIs
-
ssm_plot(results4)
+
ssm_plot(results4)

Contrasts between measures in a group

Comparing measures in a group is very similar. Again, all we need to do is add the contrast argument to the function call containing measures. Here we will use a parameter contrast to see what they look like.

-
results5 <- ssm_analyze(jz2017, PA:NO, octants(), measures = c(NARPD, ASPD),
-  contrast = "test")
-summary(results5)
-#> Call:
-#> ssm_analyze(.data = jz2017, scales = PA:NO, angles = octants(), 
-#>     measures = c(NARPD, ASPD), contrast = "test")
-#> 
-#> Statistical Basis:    Correlation Scores 
-#> Bootstrap Resamples:  2000 
-#> Confidence Level:     0.95 
-#> Listwise Deletion:    TRUE 
-#> Scale Displacements:  90 135 180 225 270 315 360 45 
-#> 
-#> Contrast [ASPD - NARPD]:
-#>                Estimate   Lower CI   Upper CI
-#> Elevation        -0.079     -0.115     -0.040
-#> X-Value          -0.037     -0.075      0.001
-#> Y-Value           0.024     -0.013      0.061
-#> Amplitude         0.037     -0.002      0.075
-#> Displacement      6.960     -2.828     17.058
-#> Model Fit         0.007
-
ssm_table(results5)
- + +
ssm_table(results5)
+
@@ -743,7 +743,7 @@

Correlation-based Structural Summary Statistic Contrasts with 95% CIs
-
ssm_plot(results5)
+
ssm_plot(results5)

Here, instead of a circle plot, we see a contrast plot showing the difference between the two measures’ SSM parameters and their 95% confidence intervals. Because the confidence interval for the elevation parameter does not include zero, this parameter is significantly different between the measures.

@@ -751,29 +751,29 @@

Contrasts between groups’ correlations

Finally, we might want to compare a single measure’s profiles in two different groups. To do so, we need to specify the measures, the grouping variable, and the type of contrast. In this case, we need to ensure that we are providing only a single measure and a grouping variable with just two levels (as again only two things can be contrasted at a time). Note that the contrast name in this case will take the form of MEASURE: GROUP2 - GROUP1.

-
results6 <- ssm_analyze(jz2017, PA:NO, octants(), measures = BORPD, 
-  grouping = Gender, contrast = "test")
-summary(results6)
-#> Call:
-#> ssm_analyze(.data = jz2017, scales = PA:NO, angles = octants(), 
-#>     measures = BORPD, grouping = Gender, contrast = "test")
-#> 
-#> Statistical Basis:    Correlation Scores 
-#> Bootstrap Resamples:  2000 
-#> Confidence Level:     0.95 
-#> Listwise Deletion:    TRUE 
-#> Scale Displacements:  90 135 180 225 270 315 360 45 
-#> 
-#> Contrast [BORPD: Male - Female]:
-#>                Estimate   Lower CI   Upper CI
-#> Elevation         0.069      0.003      0.138
-#> X-Value           0.080      0.018      0.148
-#> Y-Value          -0.072     -0.155      0.004
-#> Amplitude        -0.088     -0.162     -0.009
-#> Displacement    -40.880   -116.436     18.676
-#> Model Fit        -0.447
-
ssm_table(results6)
- + +
ssm_table(results6)
+
@@ -824,7 +824,7 @@

Correlation-based Structural Summary Statistic Contrasts with 95% CIs
-
ssm_plot(results6)
+
ssm_plot(results6)

@@ -1004,12 +1004,12 @@

Combining and exporting tables

In some cases, such as multiple contrasts or groupings, we may want to combine several tables into one by joining them together as rows. This can be done using the ssm_append() function.

-
res1 <- ssm_analyze(jz2017s, PA:NO, octants())
-res2 <- ssm_analyze(jz2017s, PA:NO, octants(), grouping = Gender)
-tab1 <- ssm_table(res1, xy = FALSE, render = FALSE)
-tab2 <- ssm_table(res2, xy = FALSE, render = FALSE)
-ssm_append(tab1, tab2)
- +
res1 <- ssm_analyze(jz2017s, PA:NO, octants())
+res2 <- ssm_analyze(jz2017s, PA:NO, octants(), grouping = Gender)
+tab1 <- ssm_table(res1, xy = FALSE, render = FALSE)
+tab2 <- ssm_table(res2, xy = FALSE, render = FALSE)
+ssm_append(tab1, tab2)
+
Profile @@ -1090,21 +1090,21 @@

Basic customizations of figures

Additional arguments to the ssm_plot() function can be explored using the ?ssm_plot, ?ssm_plot_circle, and ?ssm_plot_contrast commands. For both types of figures, the fontsize argument will control the baseline text size in pts (default = 12). Some text elements will be rescaled from the specified fontsize (e.g., multiplying it by 150%). For circle plots, we have already seen the lowfit argument for including points with low model fit. Another useful option is the amax argument for the maximum value of the amplitude scale. By default, the package picks a number that will fit all the points and generate “round” numbers at each 1/5 tick; however, this default can be overwritten using the amax argument.

-
ssm_plot(results4, amax = 0.6)
+
ssm_plot(results4, amax = 0.6)

For contrast plots, several arguments exist for customizing the output. We have already seen the xy argument for including or excluding the x-value and y-value contrasts. We can also change the color and linesize of the point range (linesize in mm). Finally, we can change the axislabel displayed to the left of the plots. More complex customizations will be the subject of an advanced vignette.

-
ssm_plot(results6, xy = FALSE, color = "blue", linesize = 1,
-  axislabel = "BORPD: Male - Female")
+
ssm_plot(results6, xy = FALSE, color = "blue", linesize = 1,
+  axislabel = "BORPD: Male - Female")

Exporting figures as files

All SSM plots are created using the ggplot2 package, which is incredibly flexible and powerful. It also offers the ggsave() function to export figures to external files of various types. See the documentation for this function (?ggsave) to learn more, but some useful arguments are filename, plot, width, height, and units. We can save the figure as a raster image file (e.g., “png”, “jpeg”, “tiff”), a vector image file (e.g., “svg”), or a portable document (e.g., “pdf” or “tex”). We can also control the exact width and height of the image in different units (i.e., “in”, “cm”, or “mm”). Because the underlying graphics are vectorized in R, they can be easily scaled to any size without loss of quality and used in manuscripts, presentations, or posters.

-
p <- ssm_plot(results6, xy = FALSE, color = "blue", linesize = 1,
-  axislabel = "BORPD: Male - Female")
-ggsave(filename = "bordpd_gender.png", plot = p, width = 7.5, height = 4,
-  units = "in")
+
p <- ssm_plot(results6, xy = FALSE, color = "blue", linesize = 1,
+  axislabel = "BORPD: Male - Female")
+ggsave(filename = "bordpd_gender.png", plot = p, width = 7.5, height = 4,
+  units = "in")
@@ -1148,14 +1148,13 @@

-

Site built with pkgdown.

+

Site built with pkgdown 1.2.0.

- - - - - - + + + + - @@ -25,14 +24,15 @@
@@ -314,34 +314,34 @@

Conducting SSM for a group’s correlations with an external measure

Next, let’s say that we are interested in analyzing not the mean scores on the circumplex scales but rather their correlations with an external measure. This is sometimes referred to as “projecting” that external measure into the circumplex space. As an example, let’s project the NARPD variable, which captures symptoms of narcissistic personality disorder, into the circumplex space defined by the IIP-SC. Based on theory and previous findings, we can expect this measure to be associated with some general interpersonal distress and a style that is generally high in agency.

To conduct this analysis, we can start with the syntax from the mean-based analysis. All SSM analyses use the ssm_analyze() function and the data, scales, and angles are the same as before. However, we also need to let the function know that we want to analyze correlations with NARPD as opposed to scale means. To do this, we add an additional argument measures. Note that since correlations are already standardized, we don’t need to worry about standardizing the circumplex scales when measures is used.

-
results3 <- ssm_analyze(jz2017, PA:NO, octants(), measures = NARPD)
-summary(results3)
-#> Call:
-#> ssm_analyze(.data = jz2017, scales = PA:NO, angles = octants(), 
-#>     measures = NARPD)
-#> 
-#> Statistical Basis:    Correlation Scores 
-#> Bootstrap Resamples:  2000 
-#> Confidence Level:     0.95 
-#> Listwise Deletion:    TRUE 
-#> Scale Displacements:  90 135 180 225 270 315 360 45 
-#> 
-#> Profile [NARPD]:
-#>                Estimate   Lower CI   Upper CI
-#> Elevation         0.202      0.168      0.236
-#> X-Value          -0.062     -0.096     -0.028
-#> Y-Value           0.179      0.142      0.212
-#> Amplitude         0.189      0.154      0.224
-#> Displacement    108.967     99.065    118.903
-#> Model Fit         0.957
+

Note that this output looks very similar to the mean-based output except that the statistical basis is now correlation scores instead of mean scores and instead of saying “Profile [All]” it now says “Profile [NARPD]”.

Visualizing the results with a table and figure

We can also create a similar table and figure using the exact same syntax as before. The ssm_table() and ssm_plot() functions are smart enough to know whether the results are mean-based or correlation-based and will work in both cases.

-
ssm_table(results3)
- +
ssm_table(results3)
+
@@ -393,7 +393,7 @@

Correlation-based Structural Summary Statistics with 95% CIs

From the table, we can see that the model fit is good (>.80) and that all three SSM parameters are significantly different from zero, i.e., their confidence intervals do not include zero. Furthermore, the confidence intervals for the elevation and amplitude parameters are greater than or equal to 0.15, which can be interpreted as being “marked.” So, consistent with our hypotheses, NARPD was associated with marked general interpersonal distress (elevation) and was markedly distinctive in its profile (amplitude). The displacement parameter was somewhere between 100 and 120 degrees; to interpret this we would need to either consult the mapping between scales and angles or plot the results.

-
ssm_plot(results3)
+
ssm_plot(results3)

From this figure, it is very easy to see that, consistent with our hypotheses, the displacement for NARPD was associated with high agency and was somewhere between the “domineering” and “vindictive” octants.

@@ -438,14 +438,13 @@

-

Site built with pkgdown.

+

Site built with pkgdown 1.2.0.

- - - - - - + + + + - @@ -25,14 +24,15 @@
@@ -287,110 +287,110 @@

It is a good idea in practice to digitize and save each participant’s response to each item on an instrument, rather than just their scores on each scale. Having access to item-level data will make it easier to spot and correct mistakes, will enable more advanced analysis of missing data, and will enable latent variable models that account for measurement error (e.g., structural equation modeling). Furthermore, the functions described below will make it easy to transform and summarize such item-level data into scale scores.

First, however, we need to make sure the item-level data is in the expected format. Your data should be stored in a data frame where each row corresponds to one observation (e.g., participant, organization, or timepoint) and each column corresponds to one variable describing these observations (e.g., item responses, demographic characteristics, scale scores). The tidyverse packages provide excellent tools for getting your data into this format from a variety of different file types and formats.

For the purpose of illustration, we will work with a small-scale data set, which includes item-level responses to the Inventory of Interpersonal Problems, Short Circumplex (IIP-SC) for just 10 participants. As will become important later on, this data set contains a small amount of missing values (represented as NA). This data set is included as part of the circumplex package and can be loaded and previewed as follows:

-
data("raw_iipsc")
-print(raw_iipsc)
-#> # A tibble: 10 x 32
-#>    IIP01 IIP02 IIP03 IIP04 IIP05 IIP06 IIP07 IIP08 IIP09 IIP10 IIP11 IIP12
-#>    <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
-#>  1     0     0     0     0     1     0     1     0     2     1     0     0
-#>  2     1     1     0     0     3     2     2     1     0     1     0     1
-#>  3     1     0     1     0     1     1     1     3     0     1     0     0
-#>  4     3     2     3    NA     2     3     2     3     2     3     2     4
-#>  5     0     0     0     1     0     0     1     1     0     1     0     2
-#>  6     0     0     0     0     0     0     1     1     0     0     0     0
-#>  7     1     0     0     0     2     1     1     0     1     0     0     0
-#>  8     1     0     1     0     1     1     2     1     1     0     0     0
-#>  9     0     0     2     2     0     1     3     0     1     0     1     1
-#> 10     0     0     0     0     0     0     2     0     0     0     0     0
-#> # ... with 20 more variables: IIP13 <dbl>, IIP14 <dbl>, IIP15 <dbl>,
-#> #   IIP16 <dbl>, IIP17 <dbl>, IIP18 <dbl>, IIP19 <dbl>, IIP20 <dbl>,
-#> #   IIP21 <dbl>, IIP22 <dbl>, IIP23 <dbl>, IIP24 <dbl>, IIP25 <dbl>,
-#> #   IIP26 <dbl>, IIP27 <dbl>, IIP28 <dbl>, IIP29 <dbl>, IIP30 <dbl>,
-#> #   IIP31 <dbl>, IIP32 <dbl>
+

Ipsatizing item-level data

For some forms of circumplex data analysis (e.g., analysis of circumplex fit) but not others (e.g., structural summary method), it can be helpful to transform item-level responses by subtracting each participant’s mean across all items from his or her response on each item. This practice is called “ipsatizing” or, more precisely, deviation scoring across variables. This practice will attenuate the general factor across all items and recasts the item-level responses as deviations from one’s own mean rather than absolute responses. To perform ipsatizing and create a new set of ipsatized responses to each item, use the ipsatize() function.

-
ips_iipsc <- ipsatize(.data = raw_iipsc, items = IIP01:IIP32, na.rm = TRUE, overwrite = TRUE)
-print(ips_iipsc)
-#> # A tibble: 10 x 32
-#>      IIP01   IIP02  IIP03   IIP04  IIP05   IIP06  IIP07   IIP08   IIP09
-#>      <dbl>   <dbl>  <dbl>   <dbl>  <dbl>   <dbl>  <dbl>   <dbl>   <dbl>
-#>  1 -1      -1      -1      -1      0     -1       0     -1       1     
-#>  2  0.0625  0.0625 -0.938  -0.938  2.06   1.06    1.06   0.0625 -0.938 
-#>  3 -0.406  -1.41   -0.406  -1.41  -0.406 -0.406  -0.406  1.59   -1.41  
-#>  4  0.710  -0.290   0.710  NA     -0.290  0.710  -0.290  0.710  -0.290 
-#>  5 -0.625  -0.625  -0.625   0.375 -0.625 -0.625   0.375  0.375  -0.625 
-#>  6 -0.281  -0.281  -0.281  -0.281 -0.281 -0.281   0.719  0.719  -0.281 
-#>  7  0.5    -0.5    -0.5    -0.5    1.5    0.5     0.5   -0.5     0.5   
-#>  8  0.258  -0.742   0.258  -0.742  0.258  0.258   1.26   0.258   0.258 
-#>  9 -0.969  -0.969   1.03    1.03  -0.969  0.0312  2.03  -0.969   0.0312
-#> 10 -0.219  -0.219  -0.219  -0.219 -0.219 -0.219   1.78  -0.219  -0.219 
-#> # ... with 23 more variables: IIP10 <dbl>, IIP11 <dbl>, IIP12 <dbl>,
-#> #   IIP13 <dbl>, IIP14 <dbl>, IIP15 <dbl>, IIP16 <dbl>, IIP17 <dbl>,
-#> #   IIP18 <dbl>, IIP19 <dbl>, IIP20 <dbl>, IIP21 <dbl>, IIP22 <dbl>,
-#> #   IIP23 <dbl>, IIP24 <dbl>, IIP25 <dbl>, IIP26 <dbl>, IIP27 <dbl>,
-#> #   IIP28 <dbl>, IIP29 <dbl>, IIP30 <dbl>, IIP31 <dbl>, IIP32 <dbl>
+

Above, we told the function to overwrite the original item variables with their ipsatized versions; new ipsatized variables (ending in _i) could have been appended to the data frame instead by changing the overwrite argument to FALSE. We also told it to calculate the mean for each observation after ignoring any missing values. We could have changed this by setting the na.rm argument to FALSE.

-

We can check that the ipsatization was successful by calculating the mean of each row (i.e., each participant’s mean response) in the original and ipsatized data frames. We do this below using the rowMeans() function; we also apply the round() function to make the results fit on one row. As expected, we find below that the mean of each participant is zero in the ipsatized data frame but not in the original.

-
round(rowMeans(raw_iipsc, na.rm = TRUE), 2)
-#>  [1] 1.00 0.94 1.41 2.29 0.62 0.28 0.50 0.74 0.97 0.22
-round(rowMeans(ips_iipsc, na.rm = TRUE), 2)
-#>  [1] 0 0 0 0 0 0 0 0 0 0
+

We can check that the ipsatization was successful by calculating the mean of each row (i.e., each participant’s mean response) in the original and ipsatized data frames. We do this below using the rowMeans() function; we also apply the round() function to make the results fit on one row. As expected, we find below that the mean of each participant is zero in the ipsatized data frame but not in the original.

+

Scoring item-level data

For many forms of circumplex data analysis (e.g., structural summary method), it can be very helpful to summarize item-level responses by calculating scale scores. This is typically done by averaging a set of items that all measure the same underlying construct (e.g., location in the circumplex model). For example, the IIP-SC has 32 items in total that measure 8 scales representing octants of the interpersonal circumplex model. Thus, a participant’s score on each scale is calculated as the arithmetic mean of his or her responses to four specific items. Using the aggregate of multiple similar items produces scale scores with higher reliability than would be achieved by using only a single item per scale.

-
instrument("iipsc")
-scales(iipsc)
-#> The IIP-SC contains 8 circumplex scales.
-#> PA: Domineering (90 degrees)
-#> BC: Vindictive (135 degrees)
-#> DE: Cold (180 degrees)
-#> FG: Socially Avoidant (225 degrees)
-#> HI: Nonassertive (270 degrees)
-#> JK: Exploitable (315 degrees)
-#> LM: Overly Nurturant (360 degrees)
-#> NO: Intrusive (45 degrees)
+

Although calculating the arithmetic mean of a handful of items is not terribly difficult mathematically, doing so manually (e.g., by hand) across multiple scales and multiple participants can be tedious and error-prone. To address these issues, the circumplex package offers the score() function, which automatically calculates scale scores from item-level data.

To demonstrate, let’s return to the raw_iipsc data set. We need to give the score() function a data frame containing the item-level data (i.e., the data set), a list of variables from that data frame that contain the item-level responses to be scored, and an instrument object containing instructions on how to score the data. In order for scoring to work properly, the list of items must be in ascending order from the first to the last item and the ordering of the items must be the same as that assumed by the package. Be sure to check your item numbers against those displayed by the items() function, especially if you shuffle your items.

-
scale_scores <- score(.data = raw_iipsc, items = IIP01:IIP32, instrument = iipsc)
-print(scale_scores)
-#> # A tibble: 10 x 40
-#>    IIP01 IIP02 IIP03 IIP04 IIP05 IIP06 IIP07 IIP08 IIP09 IIP10 IIP11 IIP12
-#>    <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
-#>  1     0     0     0     0     1     0     1     0     2     1     0     0
-#>  2     1     1     0     0     3     2     2     1     0     1     0     1
-#>  3     1     0     1     0     1     1     1     3     0     1     0     0
-#>  4     3     2     3    NA     2     3     2     3     2     3     2     4
-#>  5     0     0     0     1     0     0     1     1     0     1     0     2
-#>  6     0     0     0     0     0     0     1     1     0     0     0     0
-#>  7     1     0     0     0     2     1     1     0     1     0     0     0
-#>  8     1     0     1     0     1     1     2     1     1     0     0     0
-#>  9     0     0     2     2     0     1     3     0     1     0     1     1
-#> 10     0     0     0     0     0     0     2     0     0     0     0     0
-#> # ... with 28 more variables: IIP13 <dbl>, IIP14 <dbl>, IIP15 <dbl>,
-#> #   IIP16 <dbl>, IIP17 <dbl>, IIP18 <dbl>, IIP19 <dbl>, IIP20 <dbl>,
-#> #   IIP21 <dbl>, IIP22 <dbl>, IIP23 <dbl>, IIP24 <dbl>, IIP25 <dbl>,
-#> #   IIP26 <dbl>, IIP27 <dbl>, IIP28 <dbl>, IIP29 <dbl>, IIP30 <dbl>,
-#> #   IIP31 <dbl>, IIP32 <dbl>, PA <dbl>, BC <dbl>, DE <dbl>, FG <dbl>,
-#> #   HI <dbl>, JK <dbl>, LM <dbl>, NO <dbl>
+

The scale_scores data frame contains all the item-level data from item_level_csie, as well as the newly calculated scale scores. Note that the scale score variables were named using the scale abbreviations shown by the scales() function (i.e., two-letter abbreviations from PA to NO). You can customize the naming of these variables by using the prefix and suffix arguments from the score() function. We can select and view just the scale score variables using the select() function.

-
select(scale_scores, PA:NO)
-#> # A tibble: 10 x 8
-#>       PA    BC    DE    FG    HI    JK    LM    NO
-#>    <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
-#>  1  1.75  2     1.25  0     0.5  0.25   1.5   0.75
-#>  2  0.25  0.5   0.25  0.5   2    1.75   1.25  1   
-#>  3  1     0.75  0.75  0     2.25 2      2.5   2   
-#>  4  1.75  2.25  2.5   2.33  2.5  2      2.5   2.5 
-#>  5  0.5   0.75  0     1     0.5  0.25   1.25  0.75
-#>  6  0.25  0     0     0     0    0      1     1   
-#>  7  1     0     0     0     1    1      0.75  0.25
-#>  8  1     0.25  0.75  0     0.5  0.667  1.75  1   
-#>  9  0.75  0.5   1.5   0.75  0    1      2.75  0.5 
-#> 10  0     0     0     0     0    0.5    1     0.25
+

Note that the na.rm argument for the score() function defaulted to TRUE, which means that missing values were ignored in calculating the scale scores. This practice is common in the literature, but is technically a form of single imputation and thus can produce biased results when data are not missing completely at random (MCAR). Please examine and report the amount and patterns of missingness in your data.

@@ -399,66 +399,66 @@

Finally, it can often be helpful to transform scale-level data through reference to a normative or comparison sample. This is often called “standardizing” and involves subtracting the normative sample’s mean score on a scale from each participant’s score on that scale and then dividing this difference by the normative sample’s standard deviation. This rescales the scale scores to be in standard deviation units and to describe the magnitude of each participant’s difference from the normative average.

For many circumplex instruments, the data needed to perform standardization is included in its instrument object. Some instruments even have multiple (e.g., different or overlapping) normative samples for comparisons that are matched in terms of gender, age, or nationality. In selecting a normative sample to compare to, it is important to consider both the size and the appropriateness of the sample.

To demonstrate, let’s examine the normative data sets available for the IIP-SC. Below we see that there are two options: a rather large sample of American college students and a rather small sample of American psychiatric outpatients.

-
norms(iipsc)
-#> The IIP-SC currently has 2 normative data set(s):
-#> 1. 872 American college students
-#>   Hopwood, Pincus, DeMoor, & Koonce (2011)
-#>   <https://doi.org/10.1080/00223890802388665>
-#> 2. 106 American psychiatric outpatients
-#>   Soldz, Budman, Demby, & Merry (1995)
-#>   <https://doi.org/10.1177/1073191195002001006>
+

Assuming our example data also come from a non-psychiatric community sample of mostly college students, the first normative sample seems like a better choice, especially since it is so much larger and therefore subject to less sampling error. However, there may be times when the second normative sample would be the more appropriate comparison, even despite its smaller sample.

To transform the scale scores we calculated during the last section, we can call the standardize() function and give it the scale_scores object we saved the item-level and scale-level data within. We will save the output of this function to a data frame named z_scales to reflect the idea that standardized scores are often called “z-scores.”

-
z_scales <- standardize(
-  .data = scale_scores, 
-  scales = PA:NO, 
-  angles = octants(),
-  instrument = iipsc,
-  sample = 1
-)
-print(z_scales)
-#> # A tibble: 10 x 48
-#>    IIP01 IIP02 IIP03 IIP04 IIP05 IIP06 IIP07 IIP08 IIP09 IIP10 IIP11 IIP12
-#>    <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
-#>  1     0     0     0     0     1     0     1     0     2     1     0     0
-#>  2     1     1     0     0     3     2     2     1     0     1     0     1
-#>  3     1     0     1     0     1     1     1     3     0     1     0     0
-#>  4     3     2     3    NA     2     3     2     3     2     3     2     4
-#>  5     0     0     0     1     0     0     1     1     0     1     0     2
-#>  6     0     0     0     0     0     0     1     1     0     0     0     0
-#>  7     1     0     0     0     2     1     1     0     1     0     0     0
-#>  8     1     0     1     0     1     1     2     1     1     0     0     0
-#>  9     0     0     2     2     0     1     3     0     1     0     1     1
-#> 10     0     0     0     0     0     0     2     0     0     0     0     0
-#> # ... with 36 more variables: IIP13 <dbl>, IIP14 <dbl>, IIP15 <dbl>,
-#> #   IIP16 <dbl>, IIP17 <dbl>, IIP18 <dbl>, IIP19 <dbl>, IIP20 <dbl>,
-#> #   IIP21 <dbl>, IIP22 <dbl>, IIP23 <dbl>, IIP24 <dbl>, IIP25 <dbl>,
-#> #   IIP26 <dbl>, IIP27 <dbl>, IIP28 <dbl>, IIP29 <dbl>, IIP30 <dbl>,
-#> #   IIP31 <dbl>, IIP32 <dbl>, PA <dbl>, BC <dbl>, DE <dbl>, FG <dbl>,
-#> #   HI <dbl>, JK <dbl>, LM <dbl>, NO <dbl>, PA_z <dbl>, BC_z <dbl>,
-#> #   DE_z <dbl>, FG_z <dbl>, HI_z <dbl>, JK_z <dbl>, LM_z <dbl>, NO_z <dbl>
+

Again, the output contains all the item-level, scale-level, and now the standardized scale-level variables. The new variables are named the same as the scale score variables except with a configurable prefix and suffix (by default, they are given only a suffix of _z). We can again use the select() function to view just the newly created standardized variables. These variables are the ones we are most likely to use in subsequent analyses (e.g., the structural summary method).

-
select(z_scales, PA_z:NO_z)
-#> # A tibble: 10 x 8
-#>       PA_z    BC_z   DE_z    FG_z   HI_z   JK_z    LM_z    NO_z
-#>      <dbl>   <dbl>  <dbl>   <dbl>  <dbl>  <dbl>   <dbl>   <dbl>
-#>  1  1.5     1.75    0.409 -1.11   -1.01  -1.33   0.0424 -0.344 
-#>  2 -0.773  -0.424  -0.760 -0.578   0.634  0.428 -0.261  -0.0312
-#>  3  0.364  -0.0616 -0.175 -1.11    0.907  0.721  1.25    1.22  
-#>  4  1.5     2.11    1.87   1.36    1.18   0.721  1.25    1.84  
-#>  5 -0.394  -0.0616 -1.05  -0.0501 -1.01  -1.33  -0.261  -0.344 
-#>  6 -0.773  -1.15   -1.05  -1.11   -1.55  -1.62  -0.564  -0.0312
-#>  7  0.364  -1.15   -1.05  -1.11   -0.459 -0.452 -0.867  -0.969 
-#>  8  0.364  -0.786  -0.175 -1.11   -1.01  -0.843  0.345  -0.0312
-#>  9 -0.0152 -0.424   0.702 -0.314  -1.55  -0.452  1.56   -0.656 
-#> 10 -1.15   -1.15   -1.05  -1.11   -1.55  -1.04  -0.564  -0.969
+

4. Wrap-up

In this vignette, we learned how to preview the instruments available in the circumplex package, load and examine the information contained in one of these instrument objects, ipsatize item-level data, calculate scale scores from item-level data, and standardize those scale scores using normative data included in the package. We are now in an excellent position to discover and implement new circumplex instruments. Later vignettes describe analyses and visualizations that make use of the data collected using these tools.

-

Special thanks to the authors and publishers who granted permission to include information about their instruments in this package: Michael Boudreaux, Christopher Hopwood, Leonard Horowitz, Kenneth Locke, Patrick Markey, Aaron Pincus, Elisa Trucco, and MindGarden Inc.

+

Special thanks to the authors and publishers who granted permission to include information about their instruments in this package: Michael Boudreaux, Robert Hatcher, Christopher Hopwood, Leonard Horowitz, Kenneth Locke, Patrick Markey, Aaron Pincus, Elisa Trucco, and MindGarden Inc.

@@ -483,14 +483,13 @@

-

Site built with pkgdown.

+

Site built with pkgdown 1.2.0.

- - + - + - + - + - + @@ -31,8 +31,7 @@ - - + @@ -44,7 +43,8 @@ - + + + Analysis and Visualization of Circular Data • circumplex - - - - - + + + + - -
+
-
- - - - +

+
-
-

Site built with pkgdown.

+

Site built with pkgdown 1.2.0.

-
- + - + - + - + - + @@ -31,8 +31,7 @@ - - + @@ -44,7 +43,8 @@ - + + - + @@ -9,17 +9,17 @@ Display the anchors of a circumplex instrument — anchors • circumplex - + - + - + - + - + @@ -31,8 +31,7 @@ - - + @@ -48,7 +47,8 @@ - + + - + @@ -9,17 +9,17 @@ Standardized octant scores on hypothetical circumplex scales — aw2009 • circumplex - + - + - + - + - + @@ -31,8 +31,7 @@ - - + @@ -47,7 +46,8 @@ - + + - + @@ -9,17 +9,17 @@ Analysis and visualization of circumplex data — circumplex-package • circumplex - + - + - + - + - + @@ -31,8 +31,7 @@ - - + @@ -46,7 +45,8 @@ - + + - + @@ -9,17 +9,17 @@ Circumplex Scales of Interpersonal Efficacy — csie • circumplex - + - + - + - + - + @@ -31,8 +31,7 @@ - - + @@ -46,7 +45,8 @@ - + + - + @@ -9,17 +9,17 @@ Circumplex Scales of Intergroup Goals — csig • circumplex - + - + - + - + - + @@ -31,8 +31,7 @@ - - + @@ -46,7 +45,8 @@ - + + - + @@ -9,17 +9,17 @@ Circumplex Scales of Interpersonal Problems — csip • circumplex - + - + - + - + - + @@ -31,8 +31,7 @@ - - + @@ -46,7 +45,8 @@ - + + - + @@ -9,17 +9,17 @@ Circumplex Scales of Interpersonal Values — csiv • circumplex - + - + - + - + - + @@ -31,8 +31,7 @@ - - + @@ -46,7 +45,8 @@ - + + - + @@ -9,17 +9,17 @@ Save a ggplot with sensible defaults — ggsave • circumplex - + - + - + - + - + @@ -31,8 +31,7 @@ - - + @@ -46,7 +45,8 @@ - + + - + @@ -9,17 +9,17 @@ Format and render data frame as HTML table — html_render • circumplex - + - + - + - + - + @@ -31,8 +31,7 @@ - - + @@ -46,7 +45,8 @@ - + + - + @@ -9,17 +9,17 @@ Interpersonal Goals Inventory for Children, Revised Version — igicr • circumplex - + - + - + - + - + @@ -31,8 +31,7 @@ - - + @@ -46,7 +45,8 @@ - + + - + @@ -9,17 +9,17 @@ Inventory of Interpersonal Problems, Brief Version — iip32 • circumplex - + - + - + - + - + @@ -31,8 +31,7 @@ - - + @@ -48,7 +47,8 @@ - + + - + @@ -9,17 +9,17 @@ Inventory of Interpersonal Problems — iip64 • circumplex - + - + - + - + - + @@ -31,8 +31,7 @@ - - + @@ -48,7 +47,8 @@ - + + - + @@ -9,17 +9,17 @@ Inventory of Interpersonal Problems, Short Circumplex — iipsc • circumplex - + - + - + - + - + @@ -31,8 +31,7 @@ - - + @@ -46,7 +45,8 @@ - + + - + @@ -9,17 +9,17 @@ Inventory of Interpersonal Strengths, Brief Version — iis32 • circumplex - + - + - + - + - + @@ -31,8 +31,7 @@ - - + @@ -46,7 +45,8 @@ - + + - + @@ -9,17 +9,17 @@ Inventory of Interpersonal Strengths — iis64 • circumplex - + - + - + - + - + @@ -31,8 +31,7 @@ - - + @@ -46,7 +45,8 @@ - + + - + @@ -9,17 +9,17 @@ Function reference • circumplex - + - + - + - + - + @@ -31,8 +31,7 @@ - - + @@ -44,7 +43,8 @@ - + + - + @@ -9,17 +9,17 @@ Load a specific instrument object — instrument • circumplex - + - + - + - + - + @@ -31,8 +31,7 @@ - - + @@ -50,7 +49,8 @@ - + + - + @@ -9,17 +9,17 @@ List all available instruments — instruments • circumplex - + - + - + - + - + @@ -31,8 +31,7 @@ - - + @@ -48,7 +47,8 @@ - + + - + @@ -9,17 +9,17 @@ IPIP Interpersonal Circumplex — ipipipc • circumplex - + - + - + - + - + @@ -31,8 +31,7 @@ - - + @@ -46,7 +45,8 @@ - + + - + @@ -9,17 +9,17 @@ Ipsatize circumplex items using deviation scoring across variables — ipsatize • circumplex - + - + - + - + - + @@ -31,8 +31,7 @@ - - + @@ -49,7 +48,8 @@ - + + - + @@ -9,17 +9,17 @@ Interpersonal Sensitivities Circumplex — isc • circumplex - + - + - + - + - + @@ -31,8 +31,7 @@ - - + @@ -46,7 +45,8 @@ - + + - + @@ -9,17 +9,17 @@ Display the items of a circumplex instrument — items • circumplex - + - + - + - + - + @@ -31,8 +31,7 @@ - - + @@ -48,7 +47,8 @@ - + + - + @@ -9,17 +9,17 @@ Raw octant scores on real circumplex scales with covariates — jz2017 • circumplex - + - + - + - + - + @@ -31,8 +31,7 @@ - - + @@ -48,7 +47,8 @@ - + + - + @@ -9,17 +9,17 @@ Add new variables — mutate • circumplex - + - + - + - + - + @@ -31,8 +31,7 @@ - - + @@ -46,7 +45,8 @@ - + + - + @@ -9,17 +9,17 @@ Display the norms for a circumplex instrument — norms • circumplex - + - + - + - + - + @@ -31,8 +31,7 @@ - - + @@ -49,7 +48,8 @@ - + + - + @@ -9,17 +9,17 @@ Angular displacements for octant circumplex scales — octants • circumplex - + - + - + - + - + @@ -31,8 +31,7 @@ - - + @@ -48,7 +47,8 @@ - + + - + @@ -9,17 +9,17 @@ Pipe operator — %>% • circumplex - + - + - + - + - + @@ -31,8 +31,7 @@ - - + @@ -46,7 +45,8 @@ - + + - + @@ -9,17 +9,17 @@ Angular displacements for pole circumplex scales — poles • circumplex - + - + - + - + - + @@ -31,8 +31,7 @@ - - + @@ -48,7 +47,8 @@ - + + - + @@ -9,17 +9,17 @@ Angular displacements for quadrant circumplex scales — quadrants • circumplex - + - + - + - + - + @@ -31,8 +31,7 @@ - - + @@ -48,7 +47,8 @@ - + + - + @@ -9,17 +9,17 @@ Raw item responses on real circumplex scales — raw_iipsc • circumplex - + - + - + - + - + @@ -31,8 +31,7 @@ - - + @@ -48,7 +47,8 @@ - + + - + @@ -9,17 +9,17 @@ Display the scales of a circumplex instrument — scales • circumplex - + - + - + - + - + @@ -31,8 +31,7 @@ - - + @@ -47,7 +46,8 @@ - + + - + @@ -9,17 +9,17 @@ Score circumplex scales from item responses — score • circumplex - + - + - + - + - + @@ -31,8 +31,7 @@ - - + @@ -48,7 +47,8 @@ - + + - + @@ -9,17 +9,17 @@ Select variables by name — select • circumplex - + - + - + - + - + @@ -31,8 +31,7 @@ - - + @@ -46,7 +45,8 @@ - + + - + @@ -9,17 +9,17 @@ Perform analyses using the Structural Summary Method — ssm_analyze • circumplex - + - + - + - + - + @@ -31,8 +31,7 @@ - - + @@ -50,7 +49,8 @@ - + + - + @@ -9,17 +9,17 @@ Combine SSM tables — ssm_append • circumplex - + - + - + - + - + @@ -31,8 +31,7 @@ - - + @@ -46,7 +45,8 @@ - + + - + @@ -9,17 +9,17 @@ Create a figure from SSM results — ssm_plot • circumplex - + - + - + - + - + @@ -31,8 +31,7 @@ - - + @@ -46,7 +45,8 @@ - + + - + @@ -9,17 +9,17 @@ Create a Circular Plot of SSM Results — ssm_plot_circle • circumplex - + - + - + - + - + @@ -31,8 +31,7 @@ - - + @@ -48,7 +47,8 @@ - + + - + @@ -9,17 +9,17 @@ Create a Difference Plot of SSM Contrast Results — ssm_plot_contrast • circumplex - + - + - + - + - + @@ -31,8 +31,7 @@ - - + @@ -48,7 +47,8 @@ - + + - + @@ -9,17 +9,17 @@ Create HTML table from SSM results or contrasts — ssm_table • circumplex - + - + - + - + - + @@ -31,8 +31,7 @@ - - + @@ -47,7 +46,8 @@ - + + - + @@ -9,17 +9,17 @@ Standardize circumplex scales using normative data — standardize • circumplex - + - + - + - + - + @@ -31,8 +31,7 @@ - - + @@ -49,7 +48,8 @@ - + + - + @@ -9,17 +9,17 @@ Tidy eval helpers — tidyeval • circumplex - + - + - + - + - + @@ -31,8 +31,7 @@ - - + @@ -66,7 +65,8 @@ - + +