





Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
It is simply the proportion of individuals that got the “correct” answer on a question, and so it is thought of as a method of determining how “easy” an item ...
Typology: Lecture notes
1 / 9
This page cannot be seen from the preview
Don't miss anything!
We’ll need the psych package for the analyses in this demonstration.
library (psych)
When you go to use this package in your publications, you should reference the package, as this gives your readers an idea as to the version of the package used, and also gives credit to the authors of the package. You can get the citation for any package using the citation function. So... to get the citation information for the psych package, we would do the following: citation ("psych")
The dataset that we’ll use for this demonstration is called bfi and comes from the psych package. It is made up of 25 self-report personality items from the International Personality Item Pool, gender, education level and age for 2800 subjects and used in the Synthetic Aperture Personality Assessment. The personality items are split into 5 categories: Agreeableness (A), Conscientiousness (C), Extraversion (E), Neuroticism (N), Openness (O). Each item was answered on a six point scale: 1 Very Inaccurate, 2 Moderately Inaccurate, 3 Slightly Inaccurate, 4 Slightly Accurate, 5 Moderately Accurate, 6 Very Accurate. data ("bfi")
Because the data file is embedded within R, you can query this information directly within the console, with ?bfi. You can also look at the variable names and the first six lines of data, using head(bfi). head (bfi)
Finally, let’s create a data object that just has the personality items in it, to facilitate some of our later analyses. We’ll call it bfi.items. bfi.items <- bfi[,1:25]
Item Difficulty
The simplest item analyses are often the best, and that’s the case with item difficulty. It is simply the proportion of individuals that got the “correct” answer on a question, and so it is thought of as a method of determining how “easy” an item is (i.e., “is the question answered correctly by a high proportion of individuals?”) or how “difficult” an item is (i.e., “is the question answered correctly by a low proportion of individuals?”). The ability of an item to discriminate among individuals within the sample is related to this, because items that are too difficult, or too easy, are not particularly good at distinguishing amongst individuals within your sample. Thus, item difficulty is an excellent property to compute for your set of items. And the good news is that it’s quite easy to derive, in R. To start with, we will need to convert our continuous Likert style items into dichotomous items (i.e., “1” or “0”). In the BFI data, we would recode very inaccurate , moderately inaccurate , and slightly inaccurate to become inaccurate , while very accurate , moderately accurate , and slightly inaccurate become accurate ).
Scoring The Data
We’ll set up the scoring key by scale. There are five scales in our data:
Notice that we used the index within the bfi object, for each of the items. We could have used the variable names (“A1”, “A2”, etc.) within this list object, and it would have been perfectly acceptable to the key generating function - but it would have been problematic for our use of the alpha command later on.
We will now take this list object, and use the make.keys function to create the scoring key itself.
bfi.keys <- make.keys (bfi.items,bfi.keys.list,item.labels= colnames (bfi))
Finally, we can use this scoring key to calculate the scale scores for each of our 5 scales. This is also where decisions about missing data are made - I have chosen to just average the non-missing values. If we had wanted to impute missing values with mean substitution (a problematic, albeit common choice), we would use impute = "mean" in place of impute = "none". Finally, another common (and also problematic) practice is to use listwise deletion on the data, by only analyzing complete cases. To do this, you would remove impute = "none" and replace it with missing = FALSE. Because we have both positively and negatively keyed items within our scales, we need to tell the function the minimum and maximum on the scale. This allows it to reverse key the negatively keyed items before creating the scale scores (an item can be reversed by subtracting the observed value from the maximum scale score - in this case, “6”). bfi.scored <- scoreItems (bfi.keys, bfi.items, impute = "none", min=1, max=6, digits=3)
The actual scale scores for each of our five personality variables are now available within the scores value of the bfi.scored object. head (bfi.scored$scores)
Reliability Analyses
We can now use the alpha function to calculate the item statistics. Let’s start with the agreeableness scale.
output.alpha.agree <- alpha (bfi.items[, abs (bfi.keys.list$agree)], check.keys=TRUE) output.alpha.agree
We used the list object that we created to produce the scoring key, as this contained the indices associated with each of the items in the bfi.items object. You’ll notice, however, that we applied an absolute value function to the object prior to use - this is because the alpha function can’t cope with negative indices. Some of our items were, however, negatively keyed - and this needs to be taken into account within our calculations of alpha. Otherwise, these items will negatively contribute to overall alpha. Fortunately, the alpha function has the facility to automatically reverse key any items that have a negative item-total correlation. If you want to take advantage of this facility, you need to include the parameter check.keys = TRUE.
Another specific piece of information that we might be interested in is the alpha-if-deleted for each of the items. This gives us information as to how the alpha will change (up or down) when a particular item is deleted. We can access this information from within the alpha.drop value in our reliability objects.
output.alpha.agree$alpha.drop
output.alpha.consc$alpha.drop
output.alpha.extra$alpha.drop
output.alpha.neuro$alpha.drop
output.alpha.open$alpha.drop
Or we can ask for a reasonably comprehensive set of item statistics, by accessing the item.stats value in our reliability objects. This value will generate a data frame that includes the following:
value description n number of complete cases for the item raw.r correlation of each item with the total score, not corrected for item overlap std.r correlation of each item with the total score, not corrected for item overlap, based on standardized items r.cor correlation of each item with the total score, corrected for item overlap and scale reliability r.drop correlation of each item with the total score, NOT including this item mean mean of the item sd standard deviation of the item
Recall when we discussed item discrimination, in the context of item difficulty earlier? Those item-total correlations (raw.r, std.r, r.cor, r.drop) are a direct estimate of item discrimination. Items that are particularly good at discriminating between individuals at the extreme ends of the scale will have strong positive correlations with the total score, and so this correlation is often cited as a measure of the “discriminatory power” of an item.