Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • New on SSC: loevh2

    Thanks to Kit Baum a new package loevh2 is available on SSC (see ssc describe loevh2).

    The SSC package loevh2 contains the programs -loevh2- (to calculate Loevinger's H for two dichotomous (0/1) variables) and -loevh2_boot- (to provide bootstrapped confidence intervals).

    Loevinger's H (Loevinger, 1947; 1948) is a measure of association that indicates the degree to which two items form a Guttman scale. -loevh2- provides standard errors, z-statistics, p-values, and confidence intervals for the H coefficient (van der Ark et al., 2008), -loevh2_boot- additionally provides bootstrap confidence intervals (percentile method). Loevinger's H is a key coefficient in Mokken scale analysis (Mokken, 1971), used to assess the scalability of items. Warrens (2008) argues that Loevinger's H is uniquely suited for this purpose, being "the only linear transformation of the observed proportion of agreement that has zero value under independence and maximum unity independent of the marginal distributions." This makes it particularly appropriate "in cases where positive association needs to be distinguished from zero association, e.g., analyzing test items" (Warrens, 2008, p. 787) or to study overlap of two dichotomous variables.

    Because I am only interested in the association (the overlap) of two items (see also my not very good or misleading formulated question to the Stata Forum here) -loevh2- calculates Loevinger's H for only two items. If you are interested in a list of items or in Mokken scale analysis see the programs loevh and msp avaiable at SSC.

    References:
    • Loevinger, J. A. (1947). A systematic approach to the construction and evaluation of tests of ability. Psychological Monographs, 61(4), i–49. https://doi.org/10.1037/h0093565
    • Loevinger, J. A. (1948). The technique of homogeneous tests compared with some aspects of scale analysis and factor analysis. Psychological Bulletin, 45, 507–530.
    • Mokken, R. J. (1971). A Theory and Procedure of Scale Analysis. The Hague: Mouton.
    • van der Ark, L. A., Croon, M. A., & Sijtsma, K. (2008). Mokken scale analysis for dichotomous items using marginal models. Psychometrika, 73(2), 183-208. https://doi.org/10.1007/s11336-007-9034-z
    • Warrens, M. J. (2008). On association coefficients for 2×2 tables and properties that do not depend on the marginal distributions. Psychometrika, 73(4), 777-789. https://doi.org/10.1007/s11336-008-9070-3


    By the way:

    For writing -loevh2-, -loevh2_boot- and its help files I used AI assistance using the coding agent Cline with Claude 3.5 Sonnet (see also the video by Mikko Rönkkö here, especially 00:15:08 ff.). My overall experiences are positive. However, you need to learn how to ask the right questions: My first attempts generated syntactically correct code but with wrong estimates for Loevinger's H; at times code was inefficient or generated error messages that Cline (Claude) could not correct. The best approach is to subdivide the task into code snippets and build them together by yourself. Also you should give Cline suggestions how to approach the problem. The biggest advantage I see is that Cline can generate Stata help files for your programs much faster than I could do.

    Related to this is my question how to appropriately "give credit" to AI assistance: Using it, can you still claim to be the author? Should you mention the assistance and how (for example which AI, which version etc.)? We should develop standards for doing this.

  • #2
    I haven't tried using AI to write code or help files. My own rough rule of thumb is that the help file easily takes as long as the code. Again, I don't keep detailed diaries of time spent to check my own rule!

    I've heard the advice that you should write the help first. All I can say is that I admire anyone who can do that. I don't even have a good history of writing out a good code design early. That is probably flouting many courses in computer science degrees, but I have never taken any.

    I like to get a simple version of a command working quickly, and then adding features (and subtracting them too) comes out of many iterations.

    Comment

    Working...
    X