|
Hello all, I'd like to run a series of following commands only if a var1 is either 0 or missing without making any permanent changes in my data set. Compute var2=(CGI_InitialScore)-(CGI_Latest_Score). RECODE var2 (-5.00=-1) (-2.00=-1) (-1.00=Copy) (0=Copy) (1.00=Copy) (2=2) (3=2) (4=2) (5=2) (SYSMIS=SYSMIS) INTO var3. VALUE LABELS var3 -1 'Negative Change' 0 'No Change' 1 'Positive Change by 1 Scale' 2 'Positive Change by >1 Scale'. FREQUENCIES VARIABLES= var2 var3 /ORDER=ANALYSIS. NONPAR CORR /VARIABLES= var2 var3 var4 var5 var6 var7 /PRINT=SPEARMAN TWOTAIL NOSIG /MISSING=PAIRWISE. Any help is appreciated! thanks Faisal |
|
temporary.
select if missing(var1) or var1=0. Rick Oliver Senior Information Developer IBM Business Analytics (SPSS) E-mail: [hidden email] From: Faisal Islam <[hidden email]> To: [hidden email] Date: 11/11/2015 01:04 PM Subject: How to apply temporary filter in my syntax Sent by: "SPSSX(r) Discussion" <[hidden email]> Hello all, I'd like to run a series of following commands only if a var1 is either 0 or missing without making any permanent changes in my data set. Compute var2=(CGI_InitialScore)-(CGI_Latest_Score). RECODE var2 (-5.00=-1) (-2.00=-1) (-1.00=Copy) (0=Copy) (1.00=Copy) (2=2) (3=2) (4=2) (5=2) (SYSMIS=SYSMIS) INTO var3. VALUE LABELS var3 -1 'Negative Change' 0 'No Change' 1 'Positive Change by 1 Scale' 2 'Positive Change by >1 Scale'. FREQUENCIES VARIABLES= var2 var3 /ORDER=ANALYSIS. NONPAR CORR /VARIABLES= var2 var3 var4 var5 var6 var7 /PRINT=SPEARMAN TWOTAIL NOSIG /MISSING=PAIRWISE. Any help is appreciated! thanks Faisal ===================== To manage your subscription to SPSSX-L, send a message to LISTSERV@...(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 |
|
Thanks Oliver for quick response. The only caveat with "temporary" is that it only perform one command after applying "select if". It did not perform the series of command in multiple steps. what I want to do is to create new variables, run frequencies and correlation based upon the filter without making permanent changes in the data set. best, Faisal From: Rick Oliver <[hidden email]> To: [hidden email] Sent: Wednesday, November 11, 2015 2:12 PM Subject: Re: How to apply temporary filter in my syntax temporary. select if missing(var1) or var1=0. Rick Oliver Senior Information Developer IBM Business Analytics (SPSS) E-mail: [hidden email] From: Faisal Islam <[hidden email]> To: [hidden email] Date: 11/11/2015 01:04 PM Subject: How to apply temporary filter in my syntax Sent by: "SPSSX(r) Discussion" <[hidden email]> Hello all, I'd like to run a series of following commands only if a var1 is either 0 or missing without making any permanent changes in my data set. Compute var2=(CGI_InitialScore)-(CGI_Latest_Score). RECODE var2 (-5.00=-1) (-2.00=-1) (-1.00=Copy) (0=Copy) (1.00=Copy) (2=2) (3=2) (4=2) (5=2) (SYSMIS=SYSMIS) INTO var3. VALUE LABELS var3 -1 'Negative Change' 0 'No Change' 1 'Positive Change by 1 Scale' 2 'Positive Change by >1 Scale'. FREQUENCIES VARIABLES= var2 var3 /ORDER=ANALYSIS. NONPAR CORR /VARIABLES= var2 var3 var4 var5 var6 var7 /PRINT=SPEARMAN TWOTAIL NOSIG /MISSING=PAIRWISE. Any help is appreciated! thanks Faisal ===================== 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 |
|
My bad. Try this:
compute filtervar=missing(var1) or var1=0. execute. filter by filtervar. <insert procedure commands> filter off. Rick Oliver Senior Information Developer IBM Business Analytics (SPSS) E-mail: [hidden email] From: Faisal Islam <[hidden email]> To: Rick Oliver/Chicago/IBM@IBMUS, "[hidden email]" <[hidden email]> Date: 11/11/2015 01:49 PM Subject: Re: How to apply temporary filter in my syntax Thanks Oliver for quick response. The only caveat with "temporary" is that it only perform one command after applying "select if". It did not perform the series of command in multiple steps. what I want to do is to create new variables, run frequencies and correlation based upon the filter without making permanent changes in the data set. best, Faisal From: Rick Oliver <[hidden email]> To: [hidden email] Sent: Wednesday, November 11, 2015 2:12 PM Subject: Re: How to apply temporary filter in my syntax temporary. select if missing(var1) or var1=0. Rick Oliver Senior Information Developer IBM Business Analytics (SPSS) E-mail: [hidden email] From: Faisal Islam <[hidden email]> To: [hidden email] Date: 11/11/2015 01:04 PM Subject: How to apply temporary filter in my syntax Sent by: "SPSSX(r) Discussion" <[hidden email]> Hello all, I'd like to run a series of following commands only if a var1 is either 0 or missing without making any permanent changes in my data set. Compute var2=(CGI_InitialScore)-(CGI_Latest_Score). RECODE var2 (-5.00=-1) (-2.00=-1) (-1.00=Copy) (0=Copy) (1.00=Copy) (2=2) (3=2) (4=2) (5=2) (SYSMIS=SYSMIS) INTO var3. VALUE LABELS var3 -1 'Negative Change' 0 'No Change' 1 'Positive Change by 1 Scale' 2 'Positive Change by >1 Scale'. FREQUENCIES VARIABLES= var2 var3 /ORDER=ANALYSIS. NONPAR CORR /VARIABLES= var2 var3 var4 var5 var6 var7 /PRINT=SPEARMAN TWOTAIL NOSIG /MISSING=PAIRWISE. Any help is appreciated! thanks Faisal ===================== To manage your subscription to SPSSX-L, send a message to LISTSERV@...(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 LISTSERV@...(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 |
|
Administrator
|
And if "without making any permanent changes in my data set" means you need to get rid of any newly created variables, then add a DELETE VARIABLES command at the end of Rick's syntax.
DELETE VARIABLES filtervar var2 var3.
--
Bruce Weaver bweaver@lakeheadu.ca http://sites.google.com/a/lakeheadu.ca/bweaver/ "When all else fails, RTFM." PLEASE NOTE THE FOLLOWING: 1. My Hotmail account is not monitored regularly. To send me an e-mail, please use the address shown above. 2. The SPSSX Discussion forum on Nabble is no longer linked to the SPSSX-L listserv administered by UGA (https://listserv.uga.edu/). |
|
Thanks Rick and Bruce. It worked very well. Much appreciated! Faisal From: Bruce Weaver <[hidden email]> To: [hidden email] Sent: Wednesday, November 11, 2015 3:18 PM Subject: Re: How to apply temporary filter in my syntax And if "without making any permanent changes in my data set" means you need to get rid of any newly created variables, then add a DELETE VARIABLES command at the end of Rick's syntax. DELETE VARIABLES filtervar var2 var3. Rick Oliver wrote > My bad. Try this: > > compute filtervar=missing(var1) or var1=0. > execute. > filter by filtervar. > <insert procedure commands> > filter off. > > Rick Oliver > Senior Information Developer > IBM Business Analytics (SPSS) > E-mail: > [hidden email] > > > > From: Faisal Islam < > fislam99@ > > > To: Rick Oliver/Chicago/[hidden email], " > [hidden email] > " > < > [hidden email] > > > Date: 11/11/2015 01:49 PM > Subject: Re: How to apply temporary filter in my syntax > > > > Thanks Oliver for quick response. The only caveat with "temporary" is that > it only perform one command after applying "select if". It did not perform > the series of command in multiple steps. what I want to do is to create > new variables, run frequencies and correlation based upon the filter > without making permanent changes in the data set. > > best, > Faisal > > From: Rick Oliver < > [hidden email] > > > To: > [hidden email] > > Sent: Wednesday, November 11, 2015 2:12 PM > Subject: Re: How to apply temporary filter in my syntax > > temporary. > select if missing(var1) or var1=0. > > Rick Oliver > Senior Information Developer > IBM Business Analytics (SPSS) > E-mail: > [hidden email] > > > > > > From: Faisal Islam > < > [hidden email] >> > To: > [hidden email] > Date: 11/11/2015 01:04 PM > Subject: How to apply temporary filter in my syntax > Sent by: "SPSSX(r) Discussion" < > [hidden email] > > > > > > Hello all, > > I'd like to run a series of following commands only if a var1 is either 0 > or missing without making any permanent changes in my data set. > > Compute var2=(CGI_InitialScore)-(CGI_Latest_Score). > RECODE var2 (-5.00=-1) (-2.00=-1) (-1.00=Copy) (0=Copy) (1.00=Copy) (2=2) > (3=2) (4=2) (5=2) (SYSMIS=SYSMIS) INTO var3. > VALUE LABELS var3 -1 'Negative Change' 0 'No Change' 1 'Positive Change by > 1 Scale' 2 'Positive Change by >1 Scale'. > FREQUENCIES VARIABLES= var2 var3 > /ORDER=ANALYSIS. > NONPAR CORR > /VARIABLES= var2 var3 var4 var5 var6 var7 > /PRINT=SPEARMAN TWOTAIL NOSIG > /MISSING=PAIRWISE. > > Any help is appreciated! > > thanks > Faisal > > ===================== 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 > > > > > > ===================== > 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 ----- -- Bruce Weaver [hidden email] http://sites.google.com/a/lakeheadu.ca/bweaver/ "When all else fails, RTFM." NOTE: My Hotmail account is not monitored regularly. To send me an e-mail, please use the address shown above. -- View this message in context: http://spssx-discussion.1045642.n5.nabble.com/How-to-apply-temporary-filter-in-my-syntax-tp5730933p5730937.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 |
|
In reply to this post by Faisal Islam
I see that you have a solution.
=====================
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
However, I think it is worth mentioning that one very good style for analyses is: "NEVER do a SAVE using a previous file name." Keep your original raw data forever; I used the extension .DDT because .DAT was treated as a special printing type on the DEC-10 when I started the convention. Make a file from each source with your standard Recodes and Scoring (often, dropping most the original raw items, since the totals would be used). I used the extension .EDT for that. Since I usually had multiple time periods as multiple lines, I often wanted at least one more file with several periods on one record. That would be called .FDT. Usually, I would have data from several sources, so most actual analyses would use a standard MATCH FILES specification of a few lines - usually, as copied lines (rather than INCLUDE= ) for purposes of clear documentation. The files in use would lead me directly to the documentation of how they were created. An analysis with SELECT IF would clearly have a non-temporary SELECT IF ; but there was never any change to my permanent data, unless there was a decision to do a major set of analyses. If there were to be late additions or corrections to the data from one source, that would take place with no change to MOST of the data used in the analysis. The newer files might be labeled with .DDT1, DET1, or whatever. -- Data that are continuously updated need records of the dates, but some of the same conventions should be useful; that is, one file name always specifies exactly the same contents -- Rich Ulrich Date: Wed, 11 Nov 2015 19:03:03 +0000 From: [hidden email] Subject: How to apply temporary filter in my syntax To: [hidden email] Hello all, I'd like to run a series of following commands only if a var1 is either 0 or missing without making any permanent changes in my data set. Compute var2=(CGI_InitialScore)-(CGI_Latest_Score). RECODE var2 (-5.00=-1) (-2.00=-1) (-1.00=Copy) (0=Copy) (1.00=Copy) (2=2) (3=2) (4=2) (5=2) (SYSMIS=SYSMIS) INTO var3. VALUE LABELS var3 -1 'Negative Change' 0 'No Change' 1 'Positive Change by 1 Scale' 2 'Positive Change by >1 Scale'. FREQUENCIES VARIABLES= var2 var3 /ORDER=ANALYSIS. NONPAR CORR /VARIABLES= var2 var3 var4 var5 var6 var7 /PRINT=SPEARMAN TWOTAIL NOSIG /MISSING=PAIRWISE. Any help is appreciated! |
|
Spss has the PERMISSIONS cmd to mark the file as read-only: http://www-01.ibm.com/support/knowledgecenter/SSLVMB_21.0.0/com.ibm.spss.statistics.help/syn_permissions.htm
=====================
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
You could also modify the file access rights via the OS, of course. Albert-Jan Date: Wed, 11 Nov 2015 22:31:44 -0500 From: [hidden email] Subject: Re: [SPSSX-L] How to apply temporary filter in my syntax To: [hidden email] I see that you have a solution.
=====================
To manage your subscription to SPSSX-L, send a message to
LISTSERV@... (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
However, I think it is worth mentioning that one very good style for analyses is: "NEVER do a SAVE using a previous file name." Keep your original raw data forever; I used the extension .DDT because .DAT was treated as a special printing type on the DEC-10 when I started the convention. Make a file from each source with your standard Recodes and Scoring (often, dropping most the original raw items, since the totals would be used). I used the extension .EDT for that. Since I usually had multiple time periods as multiple lines, I often wanted at least one more file with several periods on one record. That would be called .FDT. Usually, I would have data from several sources, so most actual analyses would use a standard MATCH FILES specification of a few lines - usually, as copied lines (rather than INCLUDE= ) for purposes of clear documentation. The files in use would lead me directly to the documentation of how they were created. An analysis with SELECT IF would clearly have a non-temporary SELECT IF ; but there was never any change to my permanent data, unless there was a decision to do a major set of analyses. If there were to be late additions or corrections to the data from one source, that would take place with no change to MOST of the data used in the analysis. The newer files might be labeled with .DDT1, DET1, or whatever. -- Data that are continuously updated need records of the dates, but some of the same conventions should be useful; that is, one file name always specifies exactly the same contents -- Rich Ulrich Date: Wed, 11 Nov 2015 19:03:03 +0000 From: [hidden email] Subject: How to apply temporary filter in my syntax To: [hidden email] Hello all, I'd like to run a series of following commands only if a var1 is either 0 or missing without making any permanent changes in my data set. Compute var2=(CGI_InitialScore)-(CGI_Latest_Score). RECODE var2 (-5.00=-1) (-2.00=-1) (-1.00=Copy) (0=Copy) (1.00=Copy) (2=2) (3=2) (4=2) (5=2) (SYSMIS=SYSMIS) INTO var3. VALUE LABELS var3 -1 'Negative Change' 0 'No Change' 1 'Positive Change by 1 Scale' 2 'Positive Change by >1 Scale'. FREQUENCIES VARIABLES= var2 var3 /ORDER=ANALYSIS. NONPAR CORR /VARIABLES= var2 var3 var4 var5 var6 var7 /PRINT=SPEARMAN TWOTAIL NOSIG /MISSING=PAIRWISE. Any help is appreciated! |
|
Dear All,
Sorry that this is not a spss related question, but I hope some people here can help. With LCA (Mplus) on 11 variables, we grouped 1100 patients into 3 classes. Now, we want to create a score, to classify future patients to one of the 3 classes. Here is a picture of the 3 class mean comparison: http://i67.tinypic.com/2icb9nd.png We want to use the 11 variables to create a score, using scoring rubrics like: below a certain value, give value 1; between a middle range, give value 2; above a certain value, give value 3; and then sum all the values for the 11 variables, and then divide the 1100 patience into 3 new groups based on the range of the sum, and then compare the three new groups with the three classes previously identified with LCA. However, the matching (new group 1 matches class 1 from LCA, new group 2 matches class 2 from LCA, etc) is not high . We got about 70% matching, but my supervisor wants to have >85% matching. My questions are: how do people create scores from LCA? Is what we are doing the right way? do we need new sample for the matching, instead of the same 1100 patience? what percentage of matching would be considered acceptable? Any inputs / comments will be welcome! Thank you very much and have a nice weekend Rongjin Guan SSW, Rutgers Univ ===================== 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 |
|
Administrator
|
Rongjin, please note the advice under point DMM1 in the "tips on posting to this list" thread, which can be viewed here: http://spssx-discussion.1045642.n5.nabble.com/Tips-on-Posting-questions-to-the-SPSS-list-td5715038.html. For your convenience, here is point DMM1:
DMM1. Don't hijack previous threads with an OT/different topic. There is a NEW THREAD option and replying to a "how do I mutilate my data using the SPSS ginzu option" with a "My table isn't coming out right" or "Python sucks/Macros rule" is bound to bury your question in the bowels of something completely irrelevant to your cause and the right people won't see it. Personally I use Nabble to view this group and Changed subject lines end up threaded under the original topic. HTH. ;-)
--
Bruce Weaver bweaver@lakeheadu.ca http://sites.google.com/a/lakeheadu.ca/bweaver/ "When all else fails, RTFM." PLEASE NOTE THE FOLLOWING: 1. My Hotmail account is not monitored regularly. To send me an e-mail, please use the address shown above. 2. The SPSSX Discussion forum on Nabble is no longer linked to the SPSSX-L listserv administered by UGA (https://listserv.uga.edu/). |
|
I had no idea the original post pertained to LCA.
Is the OP asking how to determine class membership of new cases based on the LCA performed on the original sample? I'm fairly certain the software can do it for the OP but if interested one needs to learn the model: http://mina.education.ucsb.edu/nylund-gibson/Nylund%20et%20al%202007%20SEM%20simulation.pdf Maybe that's not what's being asked. It's hard for me to tell. Ryan Sent from my iPhone > On Nov 13, 2015, at 4:14 PM, Bruce Weaver <[hidden email]> wrote: > > Rongjin, please note the advice under point DMM1 in the "tips on posting to > this list" thread, which can be viewed here: > http://spssx-discussion.1045642.n5.nabble.com/Tips-on-Posting-questions-to-the-SPSS-list-td5715038.html. > For your convenience, here is point DMM1: > > DMM1. Don't hijack previous threads with an OT/different topic. There is a > NEW THREAD option and replying to a "how do I mutilate my data using the > SPSS ginzu option" with a "My table isn't coming out right" or "Python > sucks/Macros rule" is bound to bury your question in the bowels of something > completely irrelevant to your cause and the right people won't see it. > Personally I use Nabble to view this group and Changed subject lines end up > threaded under the original topic. > > HTH. ;-) > > > > Rongjin Guan wrote >> Dear All, >> >> Sorry that this is not a spss related question, but I hope some people >> here can help. >> >> With LCA (Mplus) on 11 variables, we grouped 1100 patients into 3 classes. >> Now, we want to create a score, to classify future patients to one of the >> 3 classes. >> >> Here is a picture of the 3 class mean comparison: >> http://i67.tinypic.com/2icb9nd.png >> >> >> We want to use the 11 variables to create a score, using scoring rubrics >> like: >> below a certain value, give value 1; >> between a middle range, give value 2; >> above a certain value, give value 3; >> >> and then sum all the values for the 11 variables, and then divide the 1100 >> patience into 3 new groups based on the range of the sum, and then compare >> the three new groups with the three classes previously identified with >> LCA. However, the matching (new group 1 matches class 1 from LCA, new >> group 2 matches class 2 from LCA, etc) is not high . We got about 70% >> matching, but my supervisor wants to have >85% matching. >> >> My questions are: >> how do people create scores from LCA? Is what we are doing the right way? >> do we need new sample for the matching, instead of the same 1100 patience? >> what percentage of matching would be considered acceptable? >> >> Any inputs / comments will be welcome! >> >> Thank you very much and have a nice weekend >> >> Rongjin Guan >> SSW, Rutgers Univ >> ===================== >> To manage your subscription to SPSSX-L, send a message to > >> LISTSERV@.UGA > >> (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 > > > > > > ----- > -- > Bruce Weaver > [hidden email] > http://sites.google.com/a/lakeheadu.ca/bweaver/ > > "When all else fails, RTFM." > > NOTE: My Hotmail account is not monitored regularly. > To send me an e-mail, please use the address shown above. > > -- > View this message in context: http://spssx-discussion.1045642.n5.nabble.com/How-to-apply-temporary-filter-in-my-syntax-tp5730933p5730943.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 |
| Free forum by Nabble | Edit this page |
