data transformation

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

data transformation

Caleb Ouma
Hallo all,
My problem is that I have two variables, subloc and GPS location. The data was entered to indicate that all the GPS positions were positive. But in real situations some subloc have negative points.
 
Suppose subloc 23,45 32 and 67 have negative GPS values, what SPSS syntax can possibly transform the data.
 
Kindly advice

Caleb Ouma Ongong'a
Mobile:+254721 953 790 and +254735 392 699
Office +254-20 356 2426
P.O Box 1984-00200
Nairobi-Kenya.

Alternative e-mails
[hidden email]
[hidden email]

"Remember that happiness doesn't depend on what you are or on what you possess, but only on how you think.">




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

Calculation of sample size on multiple variables

Wincy Chan
Hi all

Could someone please advice the calculation of sample size in a case control
study with more than one variable? I have been looking up reference but with
no luck. Literature only says sample size on the effect size of one variable
between two groups but I need to test 6 continuous variables in a multiple
regression model with a binary outcome. I need to know how big a sample I
need to achieve a power of 80% in the multivariate model. Please advice.

Thanks
Wincy Chan

=====================
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: data transformation

Art Kendall
In reply to this post by Caleb Ouma
A GPS location has at least 3 components. A negative latitude indicates
south of the equator. A negative latitude indicates west of the prime
meridian at Greenwich England.  A negative altitude indicate below sea
level.
For example, Nairobi, Kenya is at about latitude -1.2381, longitude
36.8155, and altitude 5400 feet (1660 meters).
sometimes if the values are strings this would be latitude '1.2381S',
longitude '36.8155E', and altitude '5400' feet (1660 meters).
if your gps location has 3 numeric variables to show positions south of
the equator
if any(subloc, 23,45,32,67) latitude = latitude * -1.

Please post details of what your data looks like.

If you locations are stored as a set of strings, or a a long string
please post the details of total string length, whether there are always
leading blanks within a variable string, etc?
Are your locations in (decimal degrees) or (degrees minutes seconds) ?
Are your zero points always equator, prime meridian, and sea level? or
do you have some other reference point?
Does your GPS data include the time and velocity, etc so that you have
to extract the location?

What do you want to do with the locations?  Just list it? do
calculations, etc?


Art Kendall
Social Research Consultants

Caleb Ouma wrote:

> Hallo all,
> My problem is that I have two variables, subloc and GPS location. The data was entered to indicate that all the GPS positions were positive. But in real situations some subloc have negative points.
>
> Suppose subloc 23,45 32 and 67 have negative GPS values, what SPSS syntax can possibly transform the data.
>
> Kindly advice
>
> Caleb Ouma Ongong'a
> Mobile:+254721 953 790 and +254735 392 699
> Office +254-20 356 2426
> P.O Box 1984-00200
> Nairobi-Kenya.
>
> Alternative e-mails
> [hidden email]
> [hidden email]
>
> "Remember that happiness doesn't depend on what you are or on what you possess, but only on how you think.">
>
>
>
>
> ===================
> 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
Art Kendall
Social Research Consultants
Reply | Threaded
Open this post in threaded view
|

Re: data transformation

Frank H. Millard
In reply to this post by Caleb Ouma
It might be useful if your GPS is setup to record decimal degrees and WGS 84
(or a World Geographic System datum appropriate for your location)  as a
datum.  Whereas a datum selection is more dependent on your "paper" map
reference, decimal degrees are also useful if you use a custom coordinate
system, since they are always stored as real format either as text or real
numbers; allowing for simple transformation.

GPS setup and SHORT output would be helpful.
-----Original Message-----
From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of
Caleb Ouma
Sent: Monday, October 06, 2008 07:48
To: [hidden email]
Subject: data transformation

Hallo all,
My problem is that I have two variables, subloc and GPS location. The data
was entered to indicate that all the GPS positions were positive. But in
real situations some subloc have negative points.

Suppose subloc 23,45 32 and 67 have negative GPS values, what SPSS syntax
can possibly transform the data.

Kindly advice

Caleb Ouma Ongong'a
Mobile:+254721 953 790 and +254735 392 699
Office +254-20 356 2426
P.O Box 1984-00200
Nairobi-Kenya.

Alternative e-mails
[hidden email]
[hidden email]

"Remember that happiness doesn't depend on what you are or on what you
possess, but only on how you think.">




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

Counting across dates

Maguin, Eugene
In reply to this post by Wincy Chan
Suppose a set of variables, x1 to x7, with format adate10 (and a time
portion equal to 00:00:00), i.e., just the calendar date. Is there a one
step way to count how many of x1 to x7 have value between m1/d1/yyy1 and
m2/d2/yyy2. Or, in syntax

Count num.may=x1 to x7(5/14/2007 thru 6/20/2007).

I've never assumed that the range on a count list could be an expression
that evaluates to a value but I've been really wrong about this in the past.
Am I wrong here?

The shortest sequence I can think of to do this is

Do repeat x=x1 to x7/y=y1 to y7.
+  compute y=0.
+  if (x ge date.mdy(5,14,2007) and x le date.mdy(6,20,2007)) y=1.
End repeat.

Count num.may=y1 to y7(1).

Is there a better alternative?

Thanks, Gene Maguin

PS Would this be a useful extension of SYNTAX?

=====================
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: Counting across dates

Richard Ristow
At 05:05 PM 10/7/2008, Gene Maguin wrote:

>Suppose a set of variables, x1 to x7, with format adate10 (and a time
>portion equal to 00:00:00), i.e., just the calendar date. Is there a one
>step way to count how many of x1 to x7 have value between m1/d1/yyy1 and
>m2/d2/yyy2. Or, in syntax
>
>Count num.may=x1 to x7(5/14/2007 thru 6/20/2007).
>
>I've never assumed that the range on a count list could be an expression

 From the article on Count in the Command Syntax Reference, it looks
like the value lists can, indeed, only contain constants. (They
rarely or never allow expressions in lists that can use keywords like
'LO', 'HI', and 'MISSING'. Probably they couldn't, since those words
are valid variable names.)

So, you may be stuck with (and you've undoubtedly already got here), untested,

COMPUTE    num.may = 0.
DO REPEAT Date = x1 to x7.
.  COMPUTE num.may = num.may +
            RANGE(DATE.MDY(5,14,2007),DATE.MDY(6,20,2007)).
END REPEAT.

Unless I'm much mistaken, RANGE accepts expressions for all its arguments.

And, yes, lack of date constants is a deficiency of SPSS. (See SAS.)

=====================
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: Counting across dates

Richard Ristow
Sigh. Speaking of bugs ... at 05:38 PM 10/7/2008, I wrote:

>So, you may be stuck with (and you've undoubtedly already got here), untested,
>
>COMPUTE    num.may = 0.
>DO REPEAT Date = x1 to x7.
>.  COMPUTE num.may = num.may +
>            RANGE(DATE.MDY(5,14,2007),DATE.MDY(6,20,2007)).
>END REPEAT.

That gives 'RANGE' only two of the three arguments it needs. Change to

.  COMPUTE num.may = num.may +
            RANGE(Date,DATE.MDY(5,14,2007),DATE.MDY(6,20,2007)).

-Apologetically,
  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