|
I am trying to bring the output from the following descriptives procedure into tempdata.sav, where it will be matched against a file created earlier. The output displayed below (21 rows, and 9 cols (" ", n, range, min, max, sum, mean, std_dev, variance) is precisely what I would like to save in tempdata.sav. The warning issued below is not helpful enough for me to crack it. Phase1_stats.sav has 20 cols (var1 - var20), and clearly doesn't equal the number of cols below (9), but why would it, or should it? I would appreciate any help on this; thanks in advance.
get file='c:\users\bruce\documents\phase1_stats.sav'. oms /destination format=sav outfile='c:\users\bruce\documents\tempdata.sav'. DESCRIPTIVES VARIABLES=var1 to var20 /STATISTICS=MEAN SUM STDDEV VARIANCE RANGE MIN MAX. Descriptives c:\users\bruce\documents\phase1_stats.sav Descriptive Statistics NRangeMinimumMaximumSumMeanStd. DeviationVariance var162405.00.005.0017546.002.81191.864683.477 var262405.00.005.0017303.002.77291.819173.309 var362405.00.005.0017740.002.84291.816393.299 var462405.00.005.0017128.002.74491.851773.429 var562405.00.005.0017452.002.79681.850843.426 var662405.00.005.0017104.002.74101.850283.424 var762405.00.005.0017367.002.78321.810273.277 var862405.00.005.0017849.002.86041.810703.279 var962405.00.005.0017969.002.87961.886533.559 var1062405.00.005.0017966.002.87921.886203.558 var1162405.00.005.0017435.002.79411.779223.166 var1262405.00.005.0017327.002.77681.931013.729 var1362405.00.005.0017304.002.77311.894593.589 var1462405.00.005.0017371.002.78381.840723.388 var1562405.00.005.0016828.002.69681.848073.415 var1662405.00.005.0017001.002.72451.845603.406 var1762405.00.005.0017404.002.78911.814113.291 var1862405.00.005.0017474.002.80031.831383.354 var1962405.00.005.0017473.002.80021.816553.300 var2062405.00.005.0017876.002.86471.776043.154 Valid N (listwise)6240 omsend. OMSEnd Warnings Stub sizes of all the tables must matchup. OutFile "c:\users\bruce\documents\tempdata.sav". This command is not executed. ===================== 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 |
|
The problem is that your OMS request does not select a particular table type, so OMS tries to put all the tables that Descriptives produces into a single sav file, and, of course, they don't fit dimensionally. (Notes is a table.)
All you have to do is to add an /IF subcommand specifying which type of table you want OMS to capture. The subtype for the descriptives table is 'Descriptive Statistics', so your syntax might look like this. oms /IF SUBTYPE= 'Descriptive Statistics' /destination format=sav outfile='c:\users\bruce\documents\tempdata.sav'. You can find the subtype for any table by right clicking in the Viewer outline on an instance of the table or from Utilities>OMS Identifiers, or you can build the OMS syntax entirely using Utilities>OMS Control Panel. You can avoid writing a physical file at all by using dataset names assuming that you have at least SPSS 14. You would write DATASET DECLARE mydesc. and then use mydesc as the outfile value (no quotes). HTH, Jon Peck -----Original Message----- From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Bruce Colton Sent: Wednesday, September 17, 2008 3:59 PM To: [hidden email] Subject: [SPSSX-L] oms problem I am trying to bring the output from the following descriptives procedure into tempdata.sav, where it will be matched against a file created earlier. The output displayed below (21 rows, and 9 cols (" ", n, range, min, max, sum, mean, std_dev, variance) is precisely what I would like to save in tempdata.sav. The warning issued below is not helpful enough for me to crack it. Phase1_stats.sav has 20 cols (var1 - var20), and clearly doesn't equal the number of cols below (9), but why would it, or should it? I would appreciate any help on this; thanks in advance. get file='c:\users\bruce\documents\phase1_stats.sav'. oms /destination format=sav outfile='c:\users\bruce\documents\tempdata.sav'. DESCRIPTIVES VARIABLES=var1 to var20 /STATISTICS=MEAN SUM STDDEV VARIANCE RANGE MIN MAX. Descriptives c:\users\bruce\documents\phase1_stats.sav Descriptive Statistics NRangeMinimumMaximumSumMeanStd. DeviationVariance var162405.00.005.0017546.002.81191.864683.477 var262405.00.005.0017303.002.77291.819173.309 var362405.00.005.0017740.002.84291.816393.299 var462405.00.005.0017128.002.74491.851773.429 var562405.00.005.0017452.002.79681.850843.426 var662405.00.005.0017104.002.74101.850283.424 var762405.00.005.0017367.002.78321.810273.277 var862405.00.005.0017849.002.86041.810703.279 var962405.00.005.0017969.002.87961.886533.559 var1062405.00.005.0017966.002.87921.886203.558 var1162405.00.005.0017435.002.79411.779223.166 var1262405.00.005.0017327.002.77681.931013.729 var1362405.00.005.0017304.002.77311.894593.589 var1462405.00.005.0017371.002.78381.840723.388 var1562405.00.005.0016828.002.69681.848073.415 var1662405.00.005.0017001.002.72451.845603.406 var1762405.00.005.0017404.002.78911.814113.291 var1862405.00.005.0017474.002.80031.831383.354 var1962405.00.005.0017473.002.80021.816553.300 var2062405.00.005.0017876.002.86471.776043.154 Valid N (listwise)6240 omsend. OMSEnd Warnings Stub sizes of all the tables must matchup. OutFile "c:\users\bruce\documents\tempdata.sav". This command is not executed. ===================== 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 |
|
I need to create a series of correlation tables in OMS
and I’d like to use macro variables but SPSS won’t let me declare a dataset
with a macro variable. Is there a work around? Thanks for any help! DATASET DECLARE !CorrResp . OMS /SELECT TABLES /IF COMMANDS=['Correlations'] SUBTYPES=['Correlations'] /DESTINATION FORMAT=SAV OUTFILE=!CorrResp /TAG=!CorrResp. TITLE 'Correlations: Response Filter Only'. CORRELATIONS /VARIABLES=!IV !DV /PRINT=TWOTAIL NOSIG /MISSING=PAIRWISE . OMSEND TAG=[!CorrResp]. _________________________________________________________________________________________________________ Carolyn Catenhauser, M.A. | Service Management Group |
Research Manager | [hidden email] | 816.841.5611 Think Green. Please consider the environment before
printing this e-mail. -----Original Message----- The problem is that your OMS request does not select a
particular table type, so OMS tries to put all the tables that Descriptives
produces into a single sav file, and, of course, they don't fit dimensionally.
(Notes is a table.) All you have to do is to add an /IF subcommand specifying
which type of table you want OMS to capture. The subtype for the descriptives
table is 'Descriptive Statistics', so your syntax might look like this. oms /IF SUBTYPE= 'Descriptive Statistics' /destination format=sav outfile='c:\users\bruce\documents\tempdata.sav'. You can find the subtype for any table by right clicking
in the Viewer outline on an instance of the table or from Utilities>OMS
Identifiers, or you can build the OMS syntax entirely using
Utilities>OMS Control Panel. You can avoid writing a physical file at all by using
dataset names assuming that you have at least SPSS 14. You would write DATASET DECLARE mydesc. and then use mydesc as the outfile value (no quotes). HTH, Jon Peck -----Original Message----- From: SPSSX(r) Discussion
[mailto:[hidden email]] On Behalf Of Bruce Colton Sent: Wednesday, September 17, 2008 3:59 PM To: [hidden email] Subject: [SPSSX-L] oms problem I am trying to bring the output from the following
descriptives procedure into tempdata.sav, where it will be matched against a
file created earlier. The output displayed below (21 rows, and 9 cols ("
", n, range, min, max, sum, mean, std_dev, variance) is precisely what I
would like to save in tempdata.sav. The warning issued below is not helpful
enough for me to crack it. Phase1_stats.sav has 20 cols (var1 - var20), and
clearly doesn't equal the number of cols below (9), but why would it, or should
it? I would appreciate any help on this; thanks in advance. get file='c:\users\bruce\documents\phase1_stats.sav'. oms /destination format=sav outfile='c:\users\bruce\documents\tempdata.sav'. DESCRIPTIVES VARIABLES=var1 to var20 /STATISTICS=MEAN SUM STDDEV VARIANCE RANGE MIN MAX. Descriptives c:\users\bruce\documents\phase1_stats.sav Descriptive Statistics NRangeMinimumMaximumSumMeanStd. DeviationVariance var162405.00.005.0017546.002.81191.864683.477 var262405.00.005.0017303.002.77291.819173.309 var362405.00.005.0017740.002.84291.816393.299 var462405.00.005.0017128.002.74491.851773.429 var562405.00.005.0017452.002.79681.850843.426 var662405.00.005.0017104.002.74101.850283.424 var762405.00.005.0017367.002.78321.810273.277 var862405.00.005.0017849.002.86041.810703.279 var962405.00.005.0017969.002.87961.886533.559 var1062405.00.005.0017966.002.87921.886203.558 var1162405.00.005.0017435.002.79411.779223.166 var1262405.00.005.0017327.002.77681.931013.729 var1362405.00.005.0017304.002.77311.894593.589 var1462405.00.005.0017371.002.78381.840723.388 var1562405.00.005.0016828.002.69681.848073.415 var1662405.00.005.0017001.002.72451.845603.406 var1762405.00.005.0017404.002.78911.814113.291 var1862405.00.005.0017474.002.80031.831383.354 var1962405.00.005.0017473.002.80021.816553.300 var2062405.00.005.0017876.002.86471.776043.154 Valid N (listwise)6240 omsend. OMSEnd Warnings Stub sizes of all the tables must matchup. OutFile
"c:\users\bruce\documents\tempdata.sav". This command is not executed. ===================== 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
This email and any attachments thereto may contain private, confidential, and privileged material for the sole use of the intended recipient. Any review, copying, or distribution of this email (or any attachments thereto) by others is strictly prohibited. If you are not the intended recipient, please contact the sender immediately and permanently delete the original and any copies of this email and any attachments thereto. |
|
Carolyn: A dataset can be named in a macro. For example, this macro creates
a dataset name based on values of R: DEFINE !prep2 (R = !TOKENS(1)). !LET !dstname = !CONCAT('ftg_',!R) *** join together the subfiles for R. ADD FILE /FILE =
!QUOTE(!CONCAT(!UNQUOTE(!EVAL(!outpath)),"grp_",!R,"_1.sav")) /FILE =
!QUOTE(!CONCAT(!UNQUOTE(!EVAL(!outpath)),"grp_",!R,"_2.sav")) /FILE =
!QUOTE(!CONCAT(!UNQUOTE(!EVAL(!outpath)),"grp_",!R,"_3.sav")) /FILE =
!QUOTE(!CONCAT(!UNQUOTE(!EVAL(!outpath)),"grp_",!R,"_4.sav")) /FILE =
!QUOTE(!CONCAT(!UNQUOTE(!EVAL(!outpath)),"grp_",!R,"_5.sav")) . EXECUTE. DATASET NAME !dstname WINDOW = front. !ENDDEFINE. !prep2 R=55. The “!LET” command defines !dstname as a string
combining “ftg_” and the value of R. The DATASET NAME command pulls in the resulting string, for a name
of “ftg_55”. I think the issue is in the macro definition— how is “!CorrResp”
defined in your macro? Also, I’m not very familiar with OMS—can you have the
same name for an OUTFILE and a TAG in an OMS command? Jim Marks Director of Market Research x 1616 From: SPSSX(r) Discussion
[mailto:[hidden email]] On Behalf Of Carolyn Catenhauser I need to create a series of correlation
tables in OMS and I’d like to use macro variables but SPSS won’t
let me declare a dataset with a macro variable. Is there a work around? Thanks
for any help! DATASET DECLARE !CorrResp . OMS /SELECT TABLES /IF COMMANDS=['Correlations']
SUBTYPES=['Correlations'] /DESTINATION FORMAT=SAV OUTFILE=!CorrResp /TAG=!CorrResp. TITLE 'Correlations: Response Filter
Only'. CORRELATIONS /VARIABLES=!IV !DV /PRINT=TWOTAIL NOSIG /MISSING=PAIRWISE . OMSEND TAG=[!CorrResp]. _________________________________________________________________________________________________________ Carolyn Catenhauser, M.A. | Service
Management Group | Research Manager | [hidden email] |
816.841.5611 Think Green. Please consider the
environment before printing this e-mail. -----Original Message----- The problem is that your OMS request
does not select a particular table type, so OMS tries to put all the tables
that Descriptives produces into a single sav file, and, of course, they don't
fit dimensionally. (Notes is a table.) All you have to do is to add an /IF
subcommand specifying which type of table you want OMS to capture. The
subtype for the descriptives table is 'Descriptive Statistics', so your syntax
might look like this. oms /IF SUBTYPE= 'Descriptive Statistics' /destination format=sav outfile='c:\users\bruce\documents\tempdata.sav'. You can find the subtype for any table
by right clicking in the Viewer outline on an instance of the table or from
Utilities>OMS Identifiers, or you can build the OMS syntax entirely
using Utilities>OMS Control Panel. You can avoid writing a physical file at
all by using dataset names assuming that you have at least SPSS 14. You
would write DATASET DECLARE mydesc. and then use mydesc as the outfile value
(no quotes). HTH, Jon Peck -----Original Message----- From: SPSSX(r) Discussion
[mailto:[hidden email]] On Behalf Of Bruce Colton Sent: Wednesday, September 17, 2008 3:59
PM To: [hidden email] Subject: [SPSSX-L] oms problem I am trying to bring the output from the
following descriptives procedure into tempdata.sav, where it will be matched
against a file created earlier. The output displayed below (21 rows, and
9 cols (" ", n, range, min, max, sum, mean, std_dev, variance) is
precisely what I would like to save in tempdata.sav. The warning issued
below is not helpful enough for me to crack it. Phase1_stats.sav has 20
cols (var1 - var20), and clearly doesn't equal the number of cols below (9),
but why would it, or should it? I would appreciate any help on this;
thanks in advance. get
file='c:\users\bruce\documents\phase1_stats.sav'. oms /destination format=sav outfile='c:\users\bruce\documents\tempdata.sav'. DESCRIPTIVES VARIABLES=var1 to var20 /STATISTICS=MEAN SUM STDDEV VARIANCE
RANGE MIN MAX. Descriptives c:\users\bruce\documents\phase1_stats.sav Descriptive Statistics NRangeMinimumMaximumSumMeanStd.
DeviationVariance var162405.00.005.0017546.002.81191.864683.477 var262405.00.005.0017303.002.77291.819173.309 var362405.00.005.0017740.002.84291.816393.299 var462405.00.005.0017128.002.74491.851773.429 var562405.00.005.0017452.002.79681.850843.426 var662405.00.005.0017104.002.74101.850283.424 var762405.00.005.0017367.002.78321.810273.277 var862405.00.005.0017849.002.86041.810703.279 var962405.00.005.0017969.002.87961.886533.559 var1062405.00.005.0017966.002.87921.886203.558 var1162405.00.005.0017435.002.79411.779223.166 var1262405.00.005.0017327.002.77681.931013.729 var1362405.00.005.0017304.002.77311.894593.589 var1462405.00.005.0017371.002.78381.840723.388 var1562405.00.005.0016828.002.69681.848073.415 var1662405.00.005.0017001.002.72451.845603.406 var1762405.00.005.0017404.002.78911.814113.291 var1862405.00.005.0017474.002.80031.831383.354 var1962405.00.005.0017473.002.80021.816553.300 var2062405.00.005.0017876.002.86471.776043.154 Valid N (listwise)6240 omsend. OMSEnd Warnings Stub sizes of all the tables must
matchup. OutFile "c:\users\bruce\documents\tempdata.sav". This command is not executed. ===================== 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 This
email and any attachments thereto may contain private, confidential, and privileged
material for the sole use of the intended recipient. Any review, copying, or
distribution of this email (or any attachments thereto) by others is strictly
prohibited. If you are not the intended recipient, please contact the sender
immediately and permanently delete the original and any copies of this email
and any attachments thereto. |
| Free forum by Nabble | Edit this page |
