Article Acta Chiropterologica

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

Article Acta Chiropterologica

Mehr, Milenka

Dear Bruce W. Miller,

 

I'am interested at the following Article. Is it possible to get the  PDF or the Abstract?

 

 

 

 

A method for determining relative activity of free flying bats using

a new activity index for acoustic monitoring

 

Acta Chiropterologica, 3(1): 93-105, 2001

 

 

Thanks a lot

 

 Greetings Milenka

 

 

Milenka Mehr (Dipl.Biol.)

Nationalpark Bayerischer Wald

Freyunger Str.2

94481 Grafenau

 

Tel. 08552-9600-157

[hidden email]

 

Reply | Threaded
Open this post in threaded view
|

Loop or repeat structure needed to reduce repetitive syntax

Ruben Geert van den Berg

Dear all,

 

I'd like to condense some data. I'm capable of writing the required syntax but it's going to be extremely long and I suspect some LOOP/REPEAT structure should be able to reduce the amount of copying, pasting and replacing dramatically since the syntax has a very clear structure. Could anyone please propose how to rewrite the syntax below somewhat more efficiently? I'll need Ned1_1 through Ned1_24 (for 24 hours, that is).

 

Lots of TIA!

 

Ruben van den Berg

Amsterdam, the Netherlands

 

***This is the current syntax:

 

COU Ned1_1=

TV1_001

TV1_002

TV1_003

TV1_004

TV1_005

TV1_006

TV1_007

TV1_008

TV1_009

TV1_010

TV1_011

TV1_012

 

TV2_001

TV2_002

TV2_003

TV2_004

TV2_005

TV2_006

TV2_007

TV2_008

TV2_009

TV2_010

TV2_011

TV2_012

 

TV3_001

TV3_002

TV3_003

TV3_004

TV3_005

TV3_006

TV3_007

TV3_008

TV3_009

TV3_010

TV3_011

TV3_012 (57).

EXE.

 

RECODE Ned1_1(0=0)(1 thru hig=1).

 

COU Ned1_2=

TV1_013

TV1_014

TV1_015

TV1_016

TV1_017

TV1_018

TV1_019

TV1_020

TV1_021

TV1_022

TV1_023

TV1_024

 

TV2_013

TV2_014

TV2_015

TV2_016

TV2_017

TV2_018

TV2_019

TV2_020

TV2_021

TV2_022

TV2_023

TV2_024

 

TV3_013

TV3_014

TV3_015

TV3_016

TV3_017

TV3_018

TV3_019

TV3_020

TV3_021

TV3_022

TV3_023

TV3_024 (57).

EXE.

 

RECODE Ned1_2(0=0)(1 thru hig=1).

 

 ***Etcetera, through Ned1_24



See all the ways you can stay connected to friends and family
Reply | Threaded
Open this post in threaded view
|

Re: Loop or repeat structure needed to reduce repetitive syntax

Maguin, Eugene
Ruben,

Even for Ned1_1 the syntax you posted will never work correctly. You'll get
lots of errors. Have you tried it? I think that much better detail is needed
in your explanation. By the way, is COU the Dutch language equivalent to
COMpute?

Gene Maguin


>>I'd like to condense some data. I'm capable of writing the required syntax
but it's going to be extremely long and I suspect some LOOP/REPEAT structure
should be able to reduce the amount of copying, pasting and replacing
dramatically since the syntax has a very clear structure. Could anyone
please propose how to rewrite the syntax below somewhat more efficiently?
I'll need Ned1_1 through Ned1_24 (for 24 hours, that is).

***This is the current syntax:

COU Ned1_1=
TV1_001
TV1_002
TV1_003
TV1_004
TV1_005
TV1_006
TV1_007
TV1_008
TV1_009
TV1_010
TV1_011
TV1_012

TV2_001
TV2_002
TV2_003
TV2_004
TV2_005
TV2_006
TV2_007
TV2_008
TV2_009
TV2_010
TV2_011
TV2_012

TV3_001
TV3_002
TV3_003
TV3_004
TV3_005
TV3_006
TV3_007
TV3_008
TV3_009
TV3_010
TV3_011
TV3_012 (57).
EXE.

RECODE Ned1_1(0=0)(1 thru hig=1).

=====================
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: Loop or repeat structure needed to reduce repetitive syntax

ViAnn Beadle
In reply to this post by Ruben Geert van den Berg

What is your end goal here? Maybe you just need a simple multiple response tabulation?

 

From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Ruben van den Berg
Sent: Wednesday, March 11, 2009 11:47 AM
To: [hidden email]
Subject: Loop or repeat structure needed to reduce repetitive syntax

 

Dear all,

 

I'd like to condense some data. I'm capable of writing the required syntax but it's going to be extremely long and I suspect some LOOP/REPEAT structure should be able to reduce the amount of copying, pasting and replacing dramatically since the syntax has a very clear structure. Could anyone please propose how to rewrite the syntax below somewhat more efficiently? I'll need Ned1_1 through Ned1_24 (for 24 hours, that is).

 

Lots of TIA!

 

Ruben van den Berg

Amsterdam, the Netherlands

 

***This is the current syntax:

 

COU Ned1_1=

TV1_001

TV1_002

TV1_003

TV1_004

TV1_005

TV1_006

TV1_007

TV1_008

TV1_009

TV1_010

TV1_011

TV1_012

 

TV2_001

TV2_002

TV2_003

TV2_004

TV2_005

TV2_006

TV2_007

TV2_008

TV2_009

TV2_010

TV2_011

TV2_012

 

TV3_001

TV3_002

TV3_003

TV3_004

TV3_005

TV3_006

TV3_007

TV3_008

TV3_009

TV3_010

TV3_011

TV3_012 (57).

EXE.

 

RECODE Ned1_1(0=0)(1 thru hig=1).

 

COU Ned1_2=

TV1_013

TV1_014

TV1_015

TV1_016

TV1_017

TV1_018

TV1_019

TV1_020

TV1_021

TV1_022

TV1_023

TV1_024

 

TV2_013

TV2_014

TV2_015

TV2_016

TV2_017

TV2_018

TV2_019

TV2_020

TV2_021

TV2_022

TV2_023

TV2_024

 

TV3_013

TV3_014

TV3_015

TV3_016

TV3_017

TV3_018

TV3_019

TV3_020

TV3_021

TV3_022

TV3_023

TV3_024 (57).

EXE.

 

RECODE Ned1_2(0=0)(1 thru hig=1).

 

***Etcetera, through Ned1_24

 


See all the ways you can stay connected to friends and family

Reply | Threaded
Open this post in threaded view
|

Re: Loop or repeat structure needed to reduce repetitive syntax

Art Kendall
In reply to this post by Ruben Geert van den Berg
I do not completely understand your question.
Please give more detail.
In your example
for Ned1_1 TVx_y   has x go from 1 to 3 and Y go from 001 to 012.
for Ned1_2 TVx_y   has x go from 1 to 3 and Y go from 013 to 024.

What would be a parallel statement for Ned1_3?
is x always 1 to 3?
is the y for each Ned the next set of 12 values
so that
for Ned1_24 TVx_y   has x go from 1 to 3 and Y go from 276 to 288?

Are the variables for each Ned contiguous? if not how are they currently arranged?


Art Kendall

Ruben van den Berg wrote:

Dear all,

 

I'd like to condense some data. I'm capable of writing the required syntax but it's going to be extremely long and I suspect some LOOP/REPEAT structure should be able to reduce the amount of copying, pasting and replacing dramatically since the syntax has a very clear structure. Could anyone please propose how to rewrite the syntax below somewhat more efficiently? I'll need Ned1_1 through Ned1_24 (for 24 hours, that is).

 

Lots of TIA!

 

Ruben van den Berg

Amsterdam, the Netherlands

 

***This is the current syntax:

 

COU Ned1_1=

TV1_001

TV1_002

TV1_003

TV1_004

TV1_005

TV1_006

TV1_007

TV1_008

TV1_009

TV1_010

TV1_011

TV1_012

 

TV2_001

TV2_002

TV2_003

TV2_004

TV2_005

TV2_006

TV2_007

TV2_008

TV2_009

TV2_010

TV2_011

TV2_012

 

TV3_001

TV3_002

TV3_003

TV3_004

TV3_005

TV3_006

TV3_007

TV3_008

TV3_009

TV3_010

TV3_011

TV3_012 (57).

EXE.

 

RECODE Ned1_1(0=0)(1 thru hig=1).

 

COU Ned1_2=

TV1_013

TV1_014

TV1_015

TV1_016

TV1_017

TV1_018

TV1_019

TV1_020

TV1_021

TV1_022

TV1_023

TV1_024

 

TV2_013

TV2_014

TV2_015

TV2_016

TV2_017

TV2_018

TV2_019

TV2_020

TV2_021

TV2_022

TV2_023

TV2_024

 

TV3_013

TV3_014

TV3_015

TV3_016

TV3_017

TV3_018

TV3_019

TV3_020

TV3_021

TV3_022

TV3_023

TV3_024 (57).

EXE.

 

RECODE Ned1_2(0=0)(1 thru hig=1).

 

 ***Etcetera, through Ned1_24



See all the ways you can stay connected to friends and family
Art Kendall
Social Research Consultants
Reply | Threaded
Open this post in threaded view
|

More details: Loop or repeat structure needed to reduce repetitive syntax

Ruben Geert van den Berg
Dear Mr Kendall,

Thanks for your reply.
 
Actually, for Ned1_1, TVx_y needs x (1, 2, 3) and y (1 thru 16). Therefore, Ned1_1 has to count the value 57 (this is the code used for the TV channel Ned1) over 48 variables. In Ned1_z, z represents the hour of day. Since there's 24 hours in a day, I've (48 * 24 = ) 1152 TVx_y variables. These will (hopefully, at some point) render Ned1_1 thru Ned1_24.
 
The arrangement of the 1152 TVx_y variables is first TV1_y, y = 1:384, then TV2_y, y = 1:384 and finally TV3_y, y = 1:384.

Thanks very much in advance for your help! In case you need an even more detailed explanation of the situation, I'll enclose my reply to ViAnn below.
 
 
Kind regards,
 
Ruben v.d. Berg
 

 

We'd like to know the percentage of our sample (per hour) who watched a given TV channel. One of these channels (Ned_1) was coded 57, hence I'd like to count the occurence of this value over a number of TV variables. But here's the challenge:

 

 

We collected data during 24 hours, per 15 minutes. This yields 24 * 4 = 96 moments of data collection. Respondents have been asked to report a maximum of 4 simultaneous activities, rendering 4 * 96 = 384 'records' per respondent. Within each TV record, respondents filled out a maximum of 3 different channels (due to switching). This yields (a maximum of) 384 * 3 = 1152 TV records per respondent. These are

 

TVx_y

with x = 1, 2, 3 (3 channels) and

y = 1 thru 384 (records)

 

Now, each Ned1_z is actually based on 48 TVx_y variables (4 quarters by 4 simultaneous activities by 3 channels). Ned1_1 should contain TV1_y, TV2_y and TV3_y with y running from 1 thru 16. Ned1_2 should be the same with y = 17: 32. Ned1_3 should be y = 33 : 48. Etcetera. If, in some way, I manage to create Ned1_1 thru Ned1_24, their (mean * 100) will correspond to the desired percentage of respondents who -in whatever way- watched Ned_1.




 

Date: Wed, 11 Mar 2009 15:12:11 -0400
From: [hidden email]
To: [hidden email]
CC: [hidden email]
Subject: Re: Loop or repeat structure needed to reduce repetitive syntax

I do not completely understand your question.
Please give more detail.
In your example
for Ned1_1 TVx_y   has x go from 1 to 3 and Y go from 001 to 012.
for Ned1_2 TVx_y   has x go from 1 to 3 and Y go from 013 to 024.

What would be a parallel statement for Ned1_3?
is x always 1 to 3?
is the y for each Ned the next set of 12 values
so that
for Ned1_24 TVx_y   has x go from 1 to 3 and Y go from 276 to 288?

Are the variables for each Ned contiguous? if not how are they currently arranged?


Art Kendall

Ruben van den Berg wrote:

Dear all,

 

I'd like to condense some data. I'm capable of writing the required syntax but it's going to be extremely long and I suspect some LOOP/REPEAT structure should be able to reduce the amount of copying, pasting and replacing dramatically since the syntax has a very clear structure. Could anyone please propose how to rewrite the syntax below somewhat more efficiently? I'll need Ned1_1 through Ned1_24 (for 24 hours, that is).

 

Lots of TIA!

 

Ruben van den Berg

Amsterdam, the Netherlands

 

***This is the current syntax:

 

COU Ned1_1=

TV1_001

TV1_002

TV1_003

TV1_004

TV1_005

TV1_006

TV1_007

TV1_008

TV1_009

TV1_010

TV1_011

TV1_012

 

TV2_001

TV2_002

TV2_003

TV2_004

TV2_005

TV2_006

TV2_007

TV2_008

TV2_009

TV2_010

TV2_011

TV2_012

 

TV3_001

TV3_002

TV3_003

TV3_004

TV3_005

TV3_006

TV3_007

TV3_008

TV3_009

TV3_010

TV3_011

TV3_012 (57).

EXE.

 

RECODE Ned1_1(0=0)(1 thru hig=1).

 

COU Ned1_2=

TV1_013

TV1_014

TV1_015

TV1_016

TV1_017

TV1_018

TV1_019

TV1_020

TV1_021

TV1_022

TV1_023

TV1_024

 

TV2_013

TV2_014

TV2_015

TV2_016

TV2_017

TV2_018

TV2_019

TV2_020

TV2_021

TV2_022

TV2_023

TV2_024

 

TV3_013

TV3_014

TV3_015

TV3_016

TV3_017

TV3_018

TV3_019

TV3_020

TV3_021

TV3_022

TV3_023

TV3_024 (57).

EXE.

 

RECODE Ned1_2(0=0)(1 thru hig=1).

 

 ***Etcetera, through Ned1_24



See all the ways you can stay connected to friends and family


See all the ways you can stay connected to friends and family
Reply | Threaded
Open this post in threaded view
|

Re: More details: Loop or repeat structure needed to reduce repetitive syntax

Albert-Jan Roskam
Hi Ruben!

Still not sure whether I entirely understand you.

So you have a series of vars of the form NEDch_hr_TVx_y, where:
channel = 1 to 3 (I assuming this as I am also Dutch)
hour = 1 to 24
x = 1 to 3  # or is this actually the channel? (NL 1 thru 3)
y = 1 to 16

Btw, if I were you, I'd use meaningful names, if possible. The Python program below is untested, but this is how interpret your query.
You could rename the counter variable with the seekvalue parameter (ie., "counter57"), so you could do several runs, as in findit (seekvalue = 1), findit (seekvalue = 2), etc.

Good luck!
Albert-Jan

BEGIN PROGRAM.
import spss
def findit (seekvalue):
        spss.Submit("compute counter = 0.")
        for channel in range (1, 4):
                for hour in range (1, 25):
                        for x in range (1, 4):
                                for y in range (1, 17):
                                        spss.Submit("if ( NED%(channel)s_%(hour)s_TV%(x)s_%(y)s = %(seekvalue)s ) counter = counter + 1." % locals ())
findit (seekvalue = 57)
END PROGRAM.


--- On Thu, 3/12/09, Ruben van den Berg <[hidden email]> wrote:

> From: Ruben van den Berg <[hidden email]>
> Subject: More details: Loop or repeat structure needed to reduce              repetitive syntax
> To: [hidden email]
> Date: Thursday, March 12, 2009, 10:25 AM
>
>
>
> #yiv1348243340 .hmmessage P
> {
> margin:0px;padding:0px;}
> #yiv1348243340 {
> font-size:10pt;font-family:Verdana;}
>
>
>
> Dear Mr Kendall,
>
>
> Thanks for your reply.
>
>
>
> Actually, for Ned1_1, TVx_y needs x (1, 2, 3) and y (1 thru
> 16). Therefore, Ned1_1 has to count the value 57 (this
> is the code used for the TV channel Ned1) over 48 variables.
> In Ned1_z, z represents the hour of day. Since there's
> 24 hours in a day, I've (48 * 24 = ) 1152 TVx_y
> variables. These will (hopefully, at some point) render
> Ned1_1 thru Ned1_24.
>
>
>
> The arrangement of the 1152 TVx_y variables is
> first TV1_y, y = 1:384, then TV2_y, y = 1:384 and
> finally TV3_y, y = 1:384.
>
>
> Thanks very much in advance for your help! In case
> you need an even more detailed explanation of the
> situation, I'll enclose my reply to ViAnn below.
>
>
>
>
>
> Kind regards,
>
>
>
> Ruben v.d. Berg
>
>
>
>
>
>
> We'd like to know the percentage of our sample
> (per hour) who watched a given TV channel. One of these
> channels (Ned_1) was coded 57, hence I'd like to count
> the occurence of this value over a number of TV variables.
> But here's the challenge:
>
>
> We collected data during 24 hours, per 15 minutes.
> This yields 24 * 4 = 96 moments of data collection.
> Respondents have been asked to report a maximum of 4
> simultaneous activities, rendering 4 * 96 = 384
> 'records' per respondent. Within each TV record,
> respondents filled out a maximum of 3 different channels
> (due to switching). This yields (a maximum of) 384 * 3 =
> 1152 TV records per respondent. These are
>
>
> TVx_y
>
> with x = 1, 2, 3 (3 channels) and
> y =
> 1 thru 384 (records)
>
> Now,
> each Ned1_z is actually based on 48 TVx_y variables (4
> quarters by 4 simultaneous activities by 3 channels). Ned1_1
> should contain TV1_y, TV2_y and TV3_y with y running
> from 1 thru 16. Ned1_2 should be the same with y =
> 17:
> 32.
> Ned1_3 should be y = 33 : 48. Etcetera. If, in some way, I
> manage to create Ned1_1 thru Ned1_24, their (mean * 100)
> will
> correspond to the desired percentage of respondents who -in
> whatever way- watched Ned_1.
>
>
>
>
>
>
> Date: Wed, 11 Mar 2009 15:12:11 -0400
> From: [hidden email]
> To: [hidden email]
> CC: [hidden email]
> Subject: Re: Loop or repeat structure needed to reduce
> repetitive syntax
>
> I do not completely understand your question.
> Please give more detail.
> In your example
> for Ned1_1 TVx_y   has x go from 1 to 3 and Y go
> from 001 to 012.
> for Ned1_2 TVx_y   has x go from 1 to 3 and Y go
> from 013 to 024.
>
> What would be a parallel statement for Ned1_3?
> is x always 1 to 3?
> is the y for each Ned the next set of 12 values
> so that
> for Ned1_24 TVx_y   has x go from 1 to 3 and Y go
> from 276 to 288?
>
> Are the variables for each Ned contiguous? if not how are
> they currently arranged?
>
>
> Art Kendall
>
> Ruben van den Berg wrote:
>
>
> #yiv1348243340 .ExternalClass .EC_hmmessage P
> {padding:0px;}
> #yiv1348243340 .ExternalClass body.EC_hmmessage
> {font-size:10pt;font-family:Verdana;}
>
>
> Dear all,
>
> I'd like to condense some data. I'm
> capable of writing the required syntax but it's going to
> be extremely long and I suspect some LOOP/REPEAT structure
> should be able to reduce the amount of copying, pasting and
> replacing dramatically since the syntax has a very clear
> structure. Could anyone please propose how to rewrite the
> syntax below somewhat more efficiently? I'll need Ned1_1
> through Ned1_24 (for 24 hours, that is).
>
> Lots of TIA!
>
> Ruben van den
> Berg
> Amsterdam, the Netherlands
>
> ***This is the current
> syntax:
>
> COU Ned1_1=
> TV1_001
> TV1_002
> TV1_003
> TV1_004
> TV1_005
> TV1_006
> TV1_007
> TV1_008
> TV1_009
> TV1_010
> TV1_011
> TV1_012
>
> TV2_001
> TV2_002
> TV2_003
> TV2_004
> TV2_005
> TV2_006
> TV2_007
> TV2_008
> TV2_009
> TV2_010
> TV2_011
> TV2_012
>
> TV3_001
> TV3_002
> TV3_003
> TV3_004
> TV3_005
> TV3_006
> TV3_007
> TV3_008
> TV3_009
> TV3_010
> TV3_011
> TV3_012 (57).
> EXE.
>
> RECODE Ned1_1(0=0)(1 thru
> hig=1).
>
> COU Ned1_2=
> TV1_013
> TV1_014
> TV1_015
> TV1_016
> TV1_017
> TV1_018
> TV1_019
> TV1_020
> TV1_021
> TV1_022
> TV1_023
> TV1_024
>
> TV2_013
> TV2_014
> TV2_015
> TV2_016
> TV2_017
> TV2_018
> TV2_019
> TV2_020
> TV2_021
> TV2_022
> TV2_023
> TV2_024
>
> TV3_013
> TV3_014
> TV3_015
> TV3_016
> TV3_017
> TV3_018
> TV3_019
> TV3_020
> TV3_021
> TV3_022
> TV3_023
> TV3_024 (57).
> EXE.
>
> RECODE Ned1_2(0=0)(1 thru
> hig=1).
>
>  ***Etcetera,
> through Ned1_24
>
>
> See all the ways you can stay connected to
> friends and family
> See all the
> ways you can stay connected to
> friends and family
>

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