Stripping last three numbers from variable

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Stripping last three numbers from variable

Jennifer Steffes
Hi Listserv-
I have a numeric variable field (Provid) that is 7 or 8 numbers long
depending on the situation.  I want to create a new variable that strips
the last 3 digits from that field.  Can someone please show me how to do
this?
Thanks,
Jenny Steffes

Get MORE for your CME dollar at the 2008 AAP National Conference &
Exhibition (NCE), October 11-14. Register at
www.AAPexperieNCE.org/register or call 1-866-843-2271 or email
[hidden email] for a preliminary program.

=====================
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
Reply | Threaded
Open this post in threaded view
|

Re: Stripping last three numbers from variable

Oliver, Richard
data list free /var1 (f8).
begin data
1234567
12345678
end data.
compute newvar=trunc(var1/1000).
formats newvar (f5).
list.

-----Original Message-----
From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Jennifer Steffes
Sent: Wednesday, July 30, 2008 10:42 AM
To: [hidden email]
Subject: Stripping last three numbers from variable

Hi Listserv-
I have a numeric variable field (Provid) that is 7 or 8 numbers long
depending on the situation.  I want to create a new variable that strips
the last 3 digits from that field.  Can someone please show me how to do
this?
Thanks,
Jenny Steffes

Get MORE for your CME dollar at the 2008 AAP National Conference &
Exhibition (NCE), October 11-14. Register at
www.AAPexperieNCE.org/register or call 1-866-843-2271 or email
[hidden email] for a preliminary program.

=====================
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
Reply | Threaded
Open this post in threaded view
|

Re: Stripping last three numbers from variable

Sandra Delova
Hi All,

I need 25th and 75th percentile of a variable in a database, but only using
the weighted average definition 1.
I wrote this code:

SORT CASES  BY BCI_DIN CMB_TERR_ID.
SPLIT FILE  BY  BCI_DIN CMB_TERR_ID.
EXAMINE VARIABLES=DOLLARS__RHEUM BY MONTH
  /PLOT NONE
  /PERCENTILES(25,75) HAVERAGE
  /STATISTICS NONE
  /MISSING LISTWISE
  /NOTOTAL.

but still I am getting the results by Weighted Average(Definition 1) and
Tukey's Hinges.

I am beginner in SPSS and I can't figure out how to get the results without
Tukey's Hinges.



Your help will be very much appreciated.

Thanks,
Sandra

=====================
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