|
Hi everyone,
When you are appending cases from one dataset to another dataset, how much does the "width" and "decimals" matter? I made sure the variable name and the type (string and numeric) are the same, but do I need to make sure the width and decimals are the same in both datasets? Thanks, Deepa ===================== 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 |
|
At 11:17 AM 4/25/2008, Deepa Bhat wrote:
>When you are appending cases from one dataset to another dataset, >how much does the "width" and "decimals" matter? For numeric variables, they don't matter at all; the values are copied just fine. "If a numeric variable has the same name but different formats (for example, F8.0 and F8.2) in different input files, the format of the variable in the first-named file is used." - Command Syntax Reference. >I made sure the variable name and the type (string and numeric) are the >same Alas, for *strings*, the lengths must be the same in both files. I've argued that this restriction is a severe mistake on SPSS's part, but there it is. -Best wishes, Richard ===================== 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 Deepa Bhat
Hi Deepa,
I think the two files need to be 'union compatible' (in sql speak), meaning that the width and decimals should be equal (also variable type) between 'variable pairs'. But it doesn't matter if the print or display FORMAT differs between files. Use DISPLAY DICTIONARY to compare the characteristics of the two files. Cheers!! Albert-Jan --- Deepa Bhat <[hidden email]> wrote: > Hi everyone, > > When you are appending cases from one dataset to > another dataset, how > much does the "width" and "decimals" matter? > I made sure the variable name and the type (string > and numeric) are the > same, but do I need to make sure the width and > decimals are the same in > both datasets? > > Thanks, > Deepa > > ===================== > 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 > ____________________________________________________________________________________ Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ ===================== 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 |
|
For numeric variables, formats don't have to match. All numbers are stored
as floating-point binary and formats are only used for display purposes. When numeric formats conflict, the format used for variables in the first file is used. For string variables, formats do have to match in type and width (to the annoyance of some users). And variables do have to match in type (numeric or string). -----Original Message----- From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Albert-jan Roskam Sent: Saturday, April 26, 2008 5:10 AM To: [hidden email] Subject: Re: appending cases/merging Hi Deepa, I think the two files need to be 'union compatible' (in sql speak), meaning that the width and decimals should be equal (also variable type) between 'variable pairs'. But it doesn't matter if the print or display FORMAT differs between files. Use DISPLAY DICTIONARY to compare the characteristics of the two files. Cheers!! Albert-Jan --- Deepa Bhat <[hidden email]> wrote: > Hi everyone, > > When you are appending cases from one dataset to > another dataset, how > much does the "width" and "decimals" matter? > I made sure the variable name and the type (string > and numeric) are the > same, but do I need to make sure the width and > decimals are the same in > both datasets? > > Thanks, > Deepa > > ===================== > 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 > ____________________________________________________________________________ ________ Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ ===================== 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 |
|
Really? I didn't know that, thanks! I always thought
that if a variable is declared as eg. NUMERIC (9.0), it is stored as more bits (i.e. it occupies more memory, because of the greater precision) than eg. NUMERIC (2.0). So what's the difference between FORMATS and NUMERIC if both only deal with display purposes? Cheers! Albert-Jan --- ViAnn Beadle <[hidden email]> wrote: > For numeric variables, formats don't have to match. > All numbers are stored > as floating-point binary and formats are only used > for display purposes. > When numeric formats conflict, the format used for > variables in the first > file is used. > > For string variables, formats do have to match in > type and width (to the > annoyance of some users). > > And variables do have to match in type (numeric or > string). > -----Original Message----- > From: SPSSX(r) Discussion > [mailto:[hidden email]] On Behalf Of > Albert-jan Roskam > Sent: Saturday, April 26, 2008 5:10 AM > To: [hidden email] > Subject: Re: appending cases/merging > > Hi Deepa, > > I think the two files need to be 'union compatible' > (in sql speak), meaning that the width and decimals > should be equal (also variable type) between > 'variable > pairs'. But it doesn't matter if the print or > display > FORMAT differs between files. > Use DISPLAY DICTIONARY to compare the > characteristics > of the two files. > > Cheers!! > Albert-Jan > > > --- Deepa Bhat <[hidden email]> wrote: > > > Hi everyone, > > > > When you are appending cases from one dataset to > > another dataset, how > > much does the "width" and "decimals" matter? > > I made sure the variable name and the type (string > > and numeric) are the > > same, but do I need to make sure the width and > > decimals are the same in > > both datasets? > > > > Thanks, > > Deepa > > > > ===================== > > 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 > > > > > > > > ________ > Be a better friend, newshound, and > know-it-all with Yahoo! Mobile. Try it now. > http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ > > ===================== > 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 > ____________________________________________________________________________________ Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ ===================== 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 |
|
Numbers in SPSS are always double precision floating point, which means 53 bits of precision, regardless of the format, which, as ViAnn said, is just a display setting. Numeric declares a variable and is rarely necessary, because a new variable is numeric by default. Format can change a variables format within its fundamental string or numeric type and is applied to an existing variable.
ALTER TYPE, new in SPSS 16, can change the string size or the fundamental type and does some other tricks as well. -----Original Message----- From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Albert-jan Roskam Sent: Saturday, April 26, 2008 11:34 AM To: [hidden email] Subject: Re: [SPSSX-L] appending cases/merging Really? I didn't know that, thanks! I always thought that if a variable is declared as eg. NUMERIC (9.0), it is stored as more bits (i.e. it occupies more memory, because of the greater precision) than eg. NUMERIC (2.0). So what's the difference between FORMATS and NUMERIC if both only deal with display purposes? Cheers! Albert-Jan --- ViAnn Beadle <[hidden email]> wrote: > For numeric variables, formats don't have to match. > All numbers are stored > as floating-point binary and formats are only used > for display purposes. > When numeric formats conflict, the format used for > variables in the first > file is used. > > For string variables, formats do have to match in > type and width (to the > annoyance of some users). > > And variables do have to match in type (numeric or > string). > -----Original Message----- > From: SPSSX(r) Discussion > [mailto:[hidden email]] On Behalf Of > Albert-jan Roskam > Sent: Saturday, April 26, 2008 5:10 AM > To: [hidden email] > Subject: Re: appending cases/merging > > Hi Deepa, > > I think the two files need to be 'union compatible' > (in sql speak), meaning that the width and decimals > should be equal (also variable type) between > 'variable > pairs'. But it doesn't matter if the print or > display > FORMAT differs between files. > Use DISPLAY DICTIONARY to compare the > characteristics > of the two files. > > Cheers!! > Albert-Jan > > > --- Deepa Bhat <[hidden email]> wrote: > > > Hi everyone, > > > > When you are appending cases from one dataset to > > another dataset, how > > much does the "width" and "decimals" matter? > > I made sure the variable name and the type (string > > and numeric) are the > > same, but do I need to make sure the width and > > decimals are the same in > > both datasets? > > > > Thanks, > > Deepa > > > > ===================== > > 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 > > > > > > > > ________ > Be a better friend, newshound, and > know-it-all with Yahoo! Mobile. Try it now. > http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ > > ===================== > 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 > ____________________________________________________________________________________ Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ ===================== 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 |
