insert zeros?

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

insert zeros?

Ian Martin-2
I have a list of quadrat counts for various taxa,  but for any
particular quadrat, the species that did not occur are not recorded
as zero frequency.

Can anyone advise on syntax to create a rectangular data matrix of
quadrats X taxa?  That is, to insert the zero frequency values for
taxa not found in particular quadrats?

The data are presently:

quadrat$, taxon$, frequency

with as many data lines per quadrat as there were taxa found in said
quadrat.

Any assistance would be greatly appreciated.

best regards,
Ian Martin

=====================
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: insert zeros?

Spousta Jan
Hi Ian

Try this:

SORT CASES BY quadrat taxon .

CASESTOVARS
 /ID = quadrat
 /INDEX = taxon
 /GROUPBY = VARIABLE .

VARSTOCASES  /MAKE frequency FROM ** here insert all names of taxon variables **
 /INDEX = Index1(frequency)  /KEEP =  quadrat  /NULL = KEEP.

recode frequency (sysmis=0).

exe.


Best regards,
Jan

-----Original Message-----
From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Ian Martin
Sent: Tuesday, October 27, 2009 3:44 PM
To: [hidden email]
Subject: insert zeros?

I have a list of quadrat counts for various taxa,  but for any particular quadrat, the species that did not occur are not recorded as zero frequency.

Can anyone advise on syntax to create a rectangular data matrix of quadrats X taxa?  That is, to insert the zero frequency values for taxa not found in particular quadrats?

The data are presently:

quadrat$, taxon$, frequency

with as many data lines per quadrat as there were taxa found in said quadrat.

Any assistance would be greatly appreciated.

best regards,
Ian Martin

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



_____________
Tato zpráva a všechny připojené soubory jsou důvěrné a určené výlučně adresátovi(-ům). Jestliže nejste oprávněným adresátem, je zakázáno jakékoliv zveřejňování, zprostředkování nebo jiné použití těchto informací. Jestliže jste tento mail dostali neoprávněně, prosím, uvědomte odesilatele a smažte zprávu i přiložené soubory. Odesilatel nezodpovídá za jakékoliv chyby nebo opomenutí způsobené tímto přenosem.

Jste si jisti, že opravdu potřebujete vytisknout tuto zprávu a/nebo její přílohy? Myslete na přírodu.


This message and any attached files are confidential and intended solely for the addressee(s). Any publication, transmission or other use of the information by a person or entity other than the intended addressee is prohibited. If you receive this in error please contact the sender and delete the message as well as all attached documents. The sender does not accept liability for any errors or omissions as a result of the transmission.

Are you sure that you really need a print version of this message and/or its attachments? Think about nature.

-.- --

=====================
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: insert zeros?

Ian Martin-2
Jan,

Thanks for that, but it appears to me that it will generate a 3-
variable dataset, albeit with the zero frequencies added as extra
observations.

Perhaps I was unclear, but what I am hoping to do is generate a
matrix with quadrats as observations (rows) and taxa as variables
(columns), with zeros in all the appropriate places.

I'm rather embarrassed by my lack of knowledge about CASESTOVARS, but
hope that I can understand enough from a working example so that I
can learn to do it myself.

Again, your assistance is much appreciated.

best regards,
Ian

Ian D. Martin, Ph.D.
Aquatic Ecologist


On 27 Oct, 2009, at 11:08 AM, Spousta Jan wrote:

> Hi Ian
>
> Try this:
>
> SORT CASES BY quadrat taxon .
>
> CASESTOVARS
>  /ID = quadrat
>  /INDEX = taxon
>  /GROUPBY = VARIABLE .
>
> VARSTOCASES  /MAKE frequency FROM ** here insert all names of taxon
> variables **
>  /INDEX = Index1(frequency)  /KEEP =  quadrat  /NULL = KEEP.
>
> recode frequency (sysmis=0).
>
> exe.
>
>
> Best regards,
> Jan
>
> -----Original Message-----
> From: SPSSX(r) Discussion [mailto:[hidden email]] On
> Behalf Of Ian Martin
> Sent: Tuesday, October 27, 2009 3:44 PM
> To: [hidden email]
> Subject: insert zeros?
>
> I have a list of quadrat counts for various taxa,  but for any
> particular quadrat, the species that did not occur are not recorded
> as zero frequency.
>
> Can anyone advise on syntax to create a rectangular data matrix of
> quadrats X taxa?  That is, to insert the zero frequency values for
> taxa not found in particular quadrats?
>
> The data are presently:
>
> quadrat$, taxon$, frequency
>
> with as many data lines per quadrat as there were taxa found in
> said quadrat.
>
> Any assistance would be greatly appreciated.
>
> best regards,
> Ian Martin
>
> =====================
> 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
>
>
>
> _____________
> Tato zpráva a všechny připojené soubory jsou důvěrné a
> určené výlučně adresátovi(-ům). Jestliže nejste
> oprávněným adresátem, je zakázáno jakékoliv zveřejňování,
> zprostředkování nebo jiné použití těchto informací.
> Jestliže jste tento mail dostali neoprávněně, prosím, uvědomte
> odesilatele a smažte zprávu i přiložené soubory. Odesilatel
> nezodpovídá za jakékoliv chyby nebo opomenutí způsobené tímto
> přenosem.
>
> Jste si jisti, že opravdu potřebujete vytisknout tuto zprávu a/
> nebo její přílohy? Myslete na přírodu.
>
>
> This message and any attached files are confidential and intended
> solely for the addressee(s). Any publication, transmission or other
> use of the information by a person or entity other than the
> intended addressee is prohibited. If you receive this in error
> please contact the sender and delete the message as well as all
> attached documents. The sender does not accept liability for any
> errors or omissions as a result of the transmission.
>
> Are you sure that you really need a print version of this message
> and/or its attachments? Think about nature.
>
> -.- --
>
> =====================
> 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: insert zeros?

Ian Martin-2
In reply to this post by Spousta Jan
Jan,

Ah.  OK, I figured it out, using your syntax as tutorial.

Thanks very much!

Ian

Ian D. Martin, Ph.D.
Aquatic Ecologist


On 27 Oct, 2009, at 11:08 AM, Spousta Jan wrote:

> Hi Ian
>
> Try this:
>
> SORT CASES BY quadrat taxon .
>
> CASESTOVARS
>  /ID = quadrat
>  /INDEX = taxon
>  /GROUPBY = VARIABLE .
>
> VARSTOCASES  /MAKE frequency FROM ** here insert all names of taxon
> variables **
>  /INDEX = Index1(frequency)  /KEEP =  quadrat  /NULL = KEEP.
>
> recode frequency (sysmis=0).
>
> exe.
>
>
> Best regards,
> Jan
>
> -----Original Message-----
> From: SPSSX(r) Discussion [mailto:[hidden email]] On
> Behalf Of Ian Martin
> Sent: Tuesday, October 27, 2009 3:44 PM
> To: [hidden email]
> Subject: insert zeros?
>
> I have a list of quadrat counts for various taxa,  but for any
> particular quadrat, the species that did not occur are not recorded
> as zero frequency.
>
> Can anyone advise on syntax to create a rectangular data matrix of
> quadrats X taxa?  That is, to insert the zero frequency values for
> taxa not found in particular quadrats?
>
> The data are presently:
>
> quadrat$, taxon$, frequency
>
> with as many data lines per quadrat as there were taxa found in
> said quadrat.
>
> Any assistance would be greatly appreciated.
>
> best regards,
> Ian Martin
>
> =====================
> 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
>
>
>
> _____________
> Tato zpráva a všechny připojené soubory jsou důvěrné a
> určené výlučně adresátovi(-ům). Jestliže nejste
> oprávněným adresátem, je zakázáno jakékoliv zveřejňování,
> zprostředkování nebo jiné použití těchto informací.
> Jestliže jste tento mail dostali neoprávněně, prosím, uvědomte
> odesilatele a smažte zprávu i přiložené soubory. Odesilatel
> nezodpovídá za jakékoliv chyby nebo opomenutí způsobené tímto
> přenosem.
>
> Jste si jisti, že opravdu potřebujete vytisknout tuto zprávu a/
> nebo její přílohy? Myslete na přírodu.
>
>
> This message and any attached files are confidential and intended
> solely for the addressee(s). Any publication, transmission or other
> use of the information by a person or entity other than the
> intended addressee is prohibited. If you receive this in error
> please contact the sender and delete the message as well as all
> attached documents. The sender does not accept liability for any
> errors or omissions as a result of the transmission.
>
> Are you sure that you really need a print version of this message
> and/or its attachments? Think about nature.
>
> -.- --
>
> =====================
> 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