How to count number of valid values over a set of string variables

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

How to count number of valid values over a set of string variables

Staffan Lindberg

Dear list!

 

I have a material of deceased persons with a different number of causes of death (contributing, ICD-10). All these causes are string variables. The number of contributing causes varies between 1 and 14. I would like to construct a simple count variable on how many contributing causes each person has.

 

I have tried COUNT, but NVALID does not seem to be permissible there. I also tried COMPUTE with NVALID but the arguments must then be numeric variables it seems.. Is there a way out of this?

 

best

 

Staffan Lindberg

Sweden

Reply | Threaded
Open this post in threaded view
|

Re: How to count number of valid values over a set of string variables

Spousta Jan
Hi Staffan,
what about
 

COUNT nx = cause1 to cause14 ('        ') .

COMPUTE nx = 14 - nx.

EXECUTE.

 

?

Best regards,

Jan

 



From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Staffan Lindberg
Sent: Monday, July 27, 2009 1:48 PM
To: [hidden email]
Subject: How to count number of valid values over a set of string variables

Dear list!

 

I have a material of deceased persons with a different number of causes of death (contributing, ICD-10). All these causes are string variables. The number of contributing causes varies between 1 and 14. I would like to construct a simple count variable on how many contributing causes each person has.

 

I have tried COUNT, but NVALID does not seem to be permissible there. I also tried COMPUTE with NVALID but the arguments must then be numeric variables it seems.. Is there a way out of this?

 

best

 

Staffan Lindberg

Sweden

 

_____________

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.

P 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.

 

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

-.- --
Reply | Threaded
Open this post in threaded view
|

Re: How to count number of valid values over a set of string variables

Albert-Jan Roskam
Hi,

Jan's solution is simpler and therefore probably preferred, but I don't think it takes into account the possibility that the number of spaces in blank cells may vary. Also, the syntax below could easily be extended to e.g. look for certain causes of death on only the chapter or paragraph level (with SUBSTR).
compute count = 0.
do repeat #cause = cause1 to cause14.
+if (length(ltrim(#cause)) ne 0) count = count + 1.
end repeat.

Cheers!!
Albert-Jan


--- On Mon, 7/27/09, Spousta Jan <[hidden email]> wrote:

> From: Spousta Jan <[hidden email]>
> Subject: Re: How to count number of valid values over a set of string              variables
> To: [hidden email]
> Date: Monday, July 27, 2009, 1:52 PM
>
>
>
>
>  _filtered #yiv103831976 {
> font-family:Calibri;}
>  _filtered #yiv103831976 {margin:70.85pt 70.85pt 70.85pt
> 70.85pt;}
> #yiv103831976 P.MsoNormal {
> FONT-SIZE:11pt;MARGIN:0cm 0cm 0pt;FONT-FAMILY:"Calibri",
> "sans-serif";}
> #yiv103831976 LI.MsoNormal {
> FONT-SIZE:11pt;MARGIN:0cm 0cm 0pt;FONT-FAMILY:"Calibri",
> "sans-serif";}
> #yiv103831976 DIV.MsoNormal {
> FONT-SIZE:11pt;MARGIN:0cm 0cm 0pt;FONT-FAMILY:"Calibri",
> "sans-serif";}
> #yiv103831976 A:link {
> COLOR:blue;TEXT-DECORATION:underline;}
> #yiv103831976 SPAN.MsoHyperlink {
> COLOR:blue;TEXT-DECORATION:underline;}
> #yiv103831976 A:visited {
> COLOR:purple;TEXT-DECORATION:underline;}
> #yiv103831976 SPAN.MsoHyperlinkFollowed {
> COLOR:purple;TEXT-DECORATION:underline;}
> #yiv103831976 SPAN.E-postmall17 {
> COLOR:windowtext;FONT-FAMILY:"Calibri", "sans-serif";}
> #yiv103831976 .MsoChpDefault {
> }
> #yiv103831976 DIV.Section1 {
> }
>
>
>
> Hi Staffan,
> what about
> �
>
> COUNT
> nx = cause1� to cause14 ('� � � � � �
> � ')
> .
> COMPUTE
> nx = 14 - nx.
> EXECUTE.
> �
> ?
> Best
> regards,
> Jan
> �
>
>
>
> From: SPSSX(r)
> Discussion
> [mailto:[hidden email]] On Behalf Of
> Staffan
> Lindberg
> Sent: Monday, July 27, 2009 1:48 PM
> To:
> [hidden email]
> Subject: How to count number of valid values
> over a set of string variables
>
>
>
>
> Dear
> list!
>  �
> I have a material
> of deceased persons with a
> different number of causes of death (contributing, ICD-10).
> All these causes are
> string variables. The number of contributing causes varies
> between 1 and 14. I
> would like to construct a simple count variable on how many
> contributing causes
> each person has.
>  �
> I have tried COUNT,
> but NVALID does not seem
> to be permissible there. I also tried COMPUTE with NVALID
> but the arguments must
> then be numeric variables it seems.. Is there a way out of
> this?
>  �
> best
>  �
> Staffan
> Lindberg
> Sweden �
>
>
> _____________
> 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.
>
> P
> 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.
> �
> P
> 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
|

logistic regression

mpirritano
Listers,

I have calculated predicted probabilities from my logistic regression
equation. Can one make anything of the direction of the difference
between probabilities when the logistic regression coefficient is not
statistically significant. My gut tells me no, but I just want to be
sure.

Thanks
Matt



Matthew Pirritano, Ph.D.
Research Analyst IV
Medical Services Initiative (MSI)
Orange County Health Care Agency
(714) 568-5648

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