Hi all,
I realise this might sound like a basic question, but I've been unable to figure out how to delete missing cases from a dataset using a syntax command. I have around 200+ cases with at least one missing item, and I want to completely remove all missing cases in order to use the data for an SEM... Any help will be welcome. |
hi,
thanks for your reply. I'm not sure i completely understand. I used the syntax stated below earlier and it didn't work... SELECT IF (nmiss(11, 76, 138, 190, 419, 593, 597, 966, 227, 381, 208, 508, 305, 83, 84, 539, 613, 668, 910, 24, 488, 581, 722, 844, 118, 199, 637, 656, 932, 157, 182, 192, 202, 212, 246, 277, 62, 312, 373, 431, 531, 547, 87, 731, 843, 849, 865, 869, 90, 918,945, 36, 485, 371, 390, 124, 678, 687, 720, 209, 933, 345, 292, 296, 707, 873, 319, 330, 657, 111, 746, 870, 427, 274, 52, 439, 127, 271, 228, 350, 329, 458, 715, 871, 9, 677, 492, 413, 466, 480, 94, 631, 636, 716, 268, 215, 891, 906, 337, 965, 340, 459, 462, 123, 108, 592, 607, 629, 259, 166, 316, 793, 317, 359, 21, 908, 219, 334, 503, 560, 267, 153, 923, 955, 324, 375, 484, 487, 368, 934, 240, 796, 265, 441, 730, 766, 785, 552, 879, 610, 904, 502, 676, 205, 847, 654, 820, 679, 126, 644, 353, 258, 412, 896, 703, 868, 327, 573, 17, 734, 22, 385, 8, 598, 187, 132, 188, 250, 112, 673, 133, 744, 300, 959, 454, 509, 963, 456, 388, 846, 583, 92, 53, 802, 907, 587, 632, 810, 878, 362, 777, 440, 887, 287, 420, 532, 782, 293, 831, 139, 360, 922, 721, 38, 921, 683, 875, 89, 837, 477, 238, 56, 588, 433, 697, 897, 494, 752, 685, 864, 652). EXECUTE. |
Read up on the Nmiss function. The syntax statement you have is incorrect.
Gene Maguin -----Original Message----- From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Promises Sent: Friday, August 29, 2014 3:03 PM To: [hidden email] Subject: Re: Syntax command to delete missing cases hi, thanks for your reply. I'm not sure i completely understand. I used the syntax stated below earlier and it didn't work... SELECT IF (nmiss(11, 76, 138, 190, 419, 593, 597, 966, 227, 381, 208, 508, 305, 83, 84, 539, 613, 668, 910, 24, 488, 581, 722, 844, 118, 199, 637, 656, 932, 157, 182, 192, 202, 212, 246, 277, 62, 312, 373, 431, 531, 547, 87, 731, 843, 849, 865, 869, 90, 918,945, 36, 485, 371, 390, 124, 678, 687, 720, 209, 933, 345, 292, 296, 707, 873, 319, 330, 657, 111, 746, 870, 427, 274, 52, 439, 127, 271, 228, 350, 329, 458, 715, 871, 9, 677, 492, 413, 466, 480, 94, 631, 636, 716, 268, 215, 891, 906, 337, 965, 340, 459, 462, 123, 108, 592, 607, 629, 259, 166, 316, 793, 317, 359, 21, 908, 219, 334, 503, 560, 267, 153, 923, 955, 324, 375, 484, 487, 368, 934, 240, 796, 265, 441, 730, 766, 785, 552, 879, 610, 904, 502, 676, 205, 847, 654, 820, 679, 126, 644, 353, 258, 412, 896, 703, 868, 327, 573, 17, 734, 22, 385, 8, 598, 187, 132, 188, 250, 112, 673, 133, 744, 300, 959, 454, 509, 963, 456, 388, 846, 583, 92, 53, 802, 907, 587, 632, 810, 878, 362, 777, 440, 887, 287, 420, 532, 782, 293, 831, 139, 360, 922, 721, 38, 921, 683, 875, 89, 837, 477, 238, 56, 588, 433, 697, 897, 494, 752, 685, 864, 652). EXECUTE. -- View this message in context: http://spssx-discussion.1045642.n5.nabble.com/Syntax-command-to-delete-missing-cases-tp5727120p5727121.html Sent from the SPSSX Discussion mailing list archive at Nabble.com. ===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD ===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD |
In reply to this post by Promises
For one variable you could do (replace "X" with your variable name):
SELECT IF NOT MISSING(X). For multiple variables, you can use the COUNT command and then select cases that have 0 missing (replace X1 TO X10 with your variable names, can use TO to specify contiguous sets of variables). COUNT NMiss = X1 TO X10 (MISSING). SELECT IF NMiss = 0. |
Thank you. This was helpful.
|
In reply to this post by Promises
Please give a little more detail.
Are you trying to to "Listwise" deletion? Do you have such a huge number of cases that losing 200 would be trivial? Are there a few items that cause most of the the missingness?
Art Kendall
Social Research Consultants |
Isn't it the case that SEM (or any other regression procedure) will automatically delete any case with missing values? ... Mark Miller On Fri, Aug 29, 2014 at 3:22 PM, Art Kendall <[hidden email]> wrote: Please give a little more detail. |
In reply to this post by Art Kendall
I have a total of around 1,000 cases in total, my measure is comprised of 28 items. Ideally, I would prefer to keep all cases, but imputation has failed to work, as I still have missing values which means that I'm not able to have the modification indices when I use the model in AMOS...
So, while I have been able to delete cases, my best preference will be imputation, if I'm able to figure it out. |
also the item with the highest no of missing items is 3%.
|
You speak of "items" can we presume you mean in the psychometric context of summative scales?
Are these items from pre-existing and well-established scales? Are these items you have written to measure a few constructs? What is the response scale? What constructs are you measuring? What do you want to find out about the set of items?
Art Kendall
Social Research Consultants |
In reply to this post by Mark Miller
Actually not necessarily Mark! One approach is called "full information maximum likelihood", and you can estimate the maximum likelihood estimates of the SEM without dropping cases at all. (I don't use AMOS - so I am unaware if this is an option in that software.)
Paul Allison has a few thoughts on it, see below: - http://www.statisticalhorizons.com/ml-better-than-mi - http://www.statisticalhorizons.com/wp-content/uploads/MissingDataByML.pdf Agree with others about missing data problems, 20% is quite alot and takes a bit more thought than just throwing them away. |
In reply to this post by Art Kendall
Yes, the items are for a new measure I am creating, and having completed the initial psychometric analysis (including PCA - principal components analysis, with three components which are applied as the latent variables in the data in CFA) from a pilot round, my intention is to conduct CFA (confirmatory factor analysis) using the current dataset.
|
Free forum by Nabble | Edit this page |