Baseline hazard rate - cox regression model

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

Baseline hazard rate - cox regression model

pran909
Hello,

How can we calculate baseline hazard rate (h0(t)) from the cox regression models? I have to use the baseline hazard rate for determining the probability of survival for the next 1 month or 3 months or 6 months for a subject suffering from a disease. I found one formula in one research article which says probability of survival P = exp (- h0(t). h. log (HR)), where h is the time of survival for the next 3 months or 6 months etc. I have to know h0(t) to transform this HR into probability of survival. I am using SPSS for performing the analysis.

Thanks.

Reply | Threaded
Open this post in threaded view
|

Re: Baseline hazard rate - cox regression model

Alex Reutter

Including /PRINT BASELINE in your COXREG syntax (or checking "Display baseline function" in the Options subdialog) will produce a survival table with the cumulative baseline hazard.

Alex



From: pran909 <[hidden email]>
To: [hidden email]
Date: 05/26/2011 09:39 AM
Subject: Baseline hazard rate - cox regression model
Sent by: "SPSSX(r) Discussion" <[hidden email]>





Hello,

How can we calculate baseline hazard rate (h0(t)) from the cox regression
models? I have to use the baseline hazard rate for determining the
probability of survival for the next 1 month or 3 months or 6 months for a
subject suffering from a disease. I found one formula in one research
article which says probability of survival P = exp (- h0(t). h. log (HR)),
where h is the time of survival for the next 3 months or 6 months etc. I
have to know h0(t) to transform this HR into probability of survival.

Thanks.

Reply | Threaded
Open this post in threaded view
|

Combine fields

PEI-CHUN CHAO
I have two fields in my spss data file. One is state and the other is county. They are in numeric value and coded as the examples below:
State
1. NY
2. DE
3. PA

County
1. Albany
2. Philly
3. Erie
4. Sussex


I'd like to combine these two fields and create a new variable to show the "county, state" for each record such as...
Albany, NY
Erie, NY
Sussex, DE
Philly, PA

Is there an easy way to do it in SPSS?

Thank you!



************************************
This email may contain privileged and/or confidential information that is intended solely for the use of the addressee.  If you are not the intended recipient or entity, you are strictly prohibited from disclosing, copying, distributing or using any of the information contained in the transmission.  If you received this communication in error, please contact the sender immediately and destroy the material in its entirety, whether electronic or hard copy.  This communication may contain nonpublic personal information about consumers subject to the restrictions of the Gramm-Leach-Bliley Act and the Sarbanes-Oxley Act.  You may not directly or indirectly reuse or disclose such information for any purpose other than to provide the services for which you are receiving the information.
There are risks associated with the use of electronic transmission.  The sender of this information does not control the method of transmittal or service providers and assumes no duty or obligation for the security, receipt, or third party interception of this transmission.
************************************

=====================
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: Combine fields

Bruce Weaver
Administrator
Use the VALUELABEL function to compute string variables for State and County; then use CONCAT to combine them into a single variable.  

From the Help for VALUELABEL:

STRING labelvar (A120).
COMPUTE labelvar=VALUELABEL(var1).
DO REPEAT varlist=var2, var3, var4
         /newvars=labelvar2, labelvar3, labelvar4.
- STRING newvars(A120).
- COMPUTE newvars=VALUELABEL(varlist).
END REPEAT.

From the Help for CONCAT:

CONCAT(strexpr,strexpr[,..]). String. Returns a string that is the concatenation of all its arguments, which must evaluate to strings. This function requires two or more arguments. In code page mode, if strexpr is a string variable, use RTRIM if you only want the actual string value without the right-padding to the defined variable width. For example, CONCAT(RTRIM(stringvar1), RTRIM(stringvar2)).

HTH.


PEI-CHUN CHAO wrote
I have two fields in my spss data file. One is state and the other is county. They are in numeric value and coded as the examples below:
State
1. NY
2. DE
3. PA

County
1. Albany
2. Philly
3. Erie
4. Sussex


I'd like to combine these two fields and create a new variable to show the "county, state" for each record such as...
Albany, NY
Erie, NY
Sussex, DE
Philly, PA

Is there an easy way to do it in SPSS?

Thank you!



************************************
This email may contain privileged and/or confidential information that is intended solely for the use of the addressee.  If you are not the intended recipient or entity, you are strictly prohibited from disclosing, copying, distributing or using any of the information contained in the transmission.  If you received this communication in error, please contact the sender immediately and destroy the material in its entirety, whether electronic or hard copy.  This communication may contain nonpublic personal information about consumers subject to the restrictions of the Gramm-Leach-Bliley Act and the Sarbanes-Oxley Act.  You may not directly or indirectly reuse or disclose such information for any purpose other than to provide the services for which you are receiving the information.
There are risks associated with the use of electronic transmission.  The sender of this information does not control the method of transmittal or service providers and assumes no duty or obligation for the security, receipt, or third party interception of this transmission.
************************************

=====================
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
--
Bruce Weaver
bweaver@lakeheadu.ca
http://sites.google.com/a/lakeheadu.ca/bweaver/

"When all else fails, RTFM."

PLEASE NOTE THE FOLLOWING: 
1. My Hotmail account is not monitored regularly. To send me an e-mail, please use the address shown above.
2. The SPSSX Discussion forum on Nabble is no longer linked to the SPSSX-L listserv administered by UGA (https://listserv.uga.edu/).
Reply | Threaded
Open this post in threaded view
|

Re: Combine fields

Maguin, Eugene
In reply to this post by PEI-CHUN CHAO
Pei-Chun,

I'm confused by your description of the examples. Are you saying that the
variable 'state' has values of 1, 2, 3, etc and that the value label is 'NY'
for state=1, 'DE' for state=2, etc
OR are you saying that the values for state are '1. NY', '2. DE', '3. PA',
etc.

Is it true that that what is true for state is true for county?

If 'NY' is the value label for state=1, then you can use the function
Valuelabel to extract the value label for designated value. You'd do it once
for state and once for county.

String CountyState(a30).
Compute countystate=concat(rtrim(valuelabel(county)),',
',rtrim(valuelabel(state))).
Alter type countystate(amin).

If '1. NY' is a value for state, then the solution is not very hard either.
I assume you may have all 50 states and the county list might have more than
1,000 entries. So, I'll suppose the following.

String state(a6) county(a30) #a(a2) #b(a24). /* county name is 24 chars max.
String CountyState(a30).
Compute #a=substr(state,5,2).
Compute #b=substr(county,7,24).
Compute countystate=concat(rtrim(#b),', ',#a).
Alter type countystate(amin).

Gene Maguin



-----Original Message-----
From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of
PEI-CHUN CHAO
Sent: Thursday, May 26, 2011 2:59 PM
To: [hidden email]
Subject: Combine fields

I have two fields in my spss data file. One is state and the other is
county. They are in numeric value and coded as the examples below:
State
1. NY
2. DE
3. PA

County
1. Albany
2. Philly
3. Erie
4. Sussex


I'd like to combine these two fields and create a new variable to show the
"county, state" for each record such as...
Albany, NY
Erie, NY
Sussex, DE
Philly, PA

Is there an easy way to do it in SPSS?

Thank you!



************************************
This email may contain privileged and/or confidential information that is
intended solely for the use of the addressee.  If you are not the intended
recipient or entity, you are strictly prohibited from disclosing, copying,
distributing or using any of the information contained in the transmission.
If you received this communication in error, please contact the sender
immediately and destroy the material in its entirety, whether electronic or
hard copy.  This communication may contain nonpublic personal information
about consumers subject to the restrictions of the Gramm-Leach-Bliley Act
and the Sarbanes-Oxley Act.  You may not directly or indirectly reuse or
disclose such information for any purpose other than to provide the services
for which you are receiving the information.
There are risks associated with the use of electronic transmission.  The
sender of this information does not control the method of transmittal or
service providers and assumes no duty or obligation for the security,
receipt, or third party interception of this transmission.
************************************

=====================
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: Combine fields

Richard Ristow
In reply to this post by PEI-CHUN CHAO
At 02:58 PM 5/26/2011, PEI-CHUN CHAO wrote:

>I have two fields in my spss data file. One is state and the other
>is county. They are in numeric value and coded as the examples below:
>State
>1. NY
>2. DE
>3. PA
>
>County
>1. Albany
>2. Philly
>3. Erie
>4. Sussex
>
>I'd like to combine these two fields and create a new variable to
>show the "county, state" for each record such as...
>Albany, NY
>Erie, NY
>Sussex, DE
>Philly, PA


*If* the numeric codes for counties are unique across states (that
is, New York and Pennsylania don't both have counties numbered '1'),
and if the states' postal codes for ('NY', 'PA') and the counties'
names are already the value labels for their respective numeric
variables "State" and "County", then this should work (though untested):

STRING  CountyName (A20).

COMPUTE CountyName = CONCAT(RTRIM(VALUELABEL(County)),
                             ', '                     ,
                             VALUELABEL(State)        ).

But more likely county numbers do repeat between states. In that
case, you'll need an auxiliary file that's a table of state codes and
county names, indexed by the combination of a state and a county
number, and use (probably) a SORT CASES and MATCH FILES to look up
the postal codes and county names from the numeric values you have.

=====================
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: Combine fields

PEI-CHUN CHAO
In reply to this post by PEI-CHUN CHAO
Just to answer a few questions.

The variable 'state' has values of 1, 2, 3, etc and that the value label
is 'NY' for state=1, 'DE' for state=2, etc.

The the numeric codes for counties repeat between states. So for the
regions my analysis covers, we do have an Erie, NY and Erie, PA.


Peggy P.C. Chao
Marketing & Communications
M&T Bank
One M&T Plaza
Buffalo, NY14203
716-842-5647

M&T Bank - "Understanding What's Important."
>>> Richard Ristow <[hidden email]> 05/26/11 4:16 下午 >>>
At 02:58 PM 5/26/2011, PEI-CHUN CHAO wrote:

>I have two fields in my spss data file. One is state and the other
>is county. They are in numeric value and coded as the examples below:
>State
>1. NY
>2. DE
>3. PA
>
>County
>1. Albany
>2. Philly
>3. Erie
>4. Sussex
>
>I'd like to combine these two fields and create a new variable to
>show the "county, state" for each record such as...
>Albany, NY
>Erie, NY
>Sussex, DE
>Philly, PA


*If* the numeric codes for counties are unique across states (that
is, New York and Pennsylania don't both have counties numbered '1'),
and if the states' postal codes for ('NY', 'PA') and the counties'
names are already the value labels for their respective numeric
variables "State" and "County", then this should work (though untested):

STRING  CountyName (A20).

COMPUTE CountyName = CONCAT(RTRIM(VALUELABEL(County)),
                             ', '                     ,
                             VALUELABEL(State)        ).

But more likely county numbers do repeat between states. In that
case, you'll need an auxiliary file that's a table of state codes and
county names, indexed by the combination of a state and a county
number, and use (probably) a SORT CASES and MATCH FILES to look up
the postal codes and county names from the numeric values you have.

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


************************************
This email may contain privileged and/or confidential information that is intended solely for the use of the addressee.  If you are not the intended recipient or entity, you are strictly prohibited from disclosing, copying, distributing or using any of the information contained in the transmission.  If you received this communication in error, please contact the sender immediately and destroy the material in its entirety, whether electronic or hard copy.  This communication may contain nonpublic personal information about consumers subject to the restrictions of the Gramm-Leach-Bliley Act and the Sarbanes-Oxley Act.  You may not directly or indirectly reuse or disclose such information for any purpose other than to provide the services for which you are receiving the information.
There are risks associated with the use of electronic transmission.  The sender of this information does not control the method of transmittal or service providers and assumes no duty or obligation for the security, receipt, or third party interception of this transmission.
************************************

=====================
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: Combine fields

Art Kendall
In reply to this post by PEI-CHUN CHAO
To add to what others said in trying to respond to your post, If you use the FIPS coded (Federal Information Processing Standards) you can use existing files to get the value labels for states and counties.
Then you can easily concatenate the fields that have the strings and or use the strings fields to define value labels.

Art Kendall
Social Research Consultants


On 5/26/2011 2:58 PM, PEI-CHUN CHAO wrote:
I have two fields in my spss data file. One is state and the other is county. They are in numeric value and coded as the examples below:
State
1. NY
2. DE
3. PA

County
1. Albany
2. Philly
3. Erie
4. Sussex


I'd like to combine these two fields and create a new variable to show the "county, state" for each record such as...
Albany, NY
Erie, NY
Sussex, DE
Philly, PA

Is there an easy way to do it in SPSS?

Thank you!



************************************
This email may contain privileged and/or confidential information that is intended solely for the use of the addressee.  If you are not the intended recipient or entity, you are strictly prohibited from disclosing, copying, distributing or using any of the information contained in the transmission.  If you received this communication in error, please contact the sender immediately and destroy the material in its entirety, whether electronic or hard copy.  This communication may contain nonpublic personal information about consumers subject to the restrictions of the Gramm-Leach-Bliley Act and the Sarbanes-Oxley Act.  You may not directly or indirectly reuse or disclose such information for any purpose other than to provide the services for which you are receiving the information.
There are risks associated with the use of electronic transmission.  The sender of this information does not control the method of transmittal or service providers and assumes no duty or obligation for the security, receipt, or third party interception of this transmission.
************************************

=====================
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: Combine fields

Richard Ristow
In reply to this post by PEI-CHUN CHAO
At 10:24 PM 5/26/2011, PEI-CHUN CHAO wrote:

>The variable 'state' has values of 1, 2, 3, etc and that the value
>label is 'NY' for state=1, 'DE' for state=2, etc.
>
>The the numeric codes for counties repeat between states. So for the
>regions my analysis covers, we do have an Erie, NY and Erie, PA.

As long as each county numeric code always refers to the same county
*name* in every state, you're fine. If one code can refer to
differently named counties in different states, it's more difficult.

=====================
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: Combine fields

John F Hall
In reply to this post by PEI-CHUN CHAO
Richard's syntax gives you a string variable.  You can create a new numeric variable by combining the values of state and county using COMPUTE.  The following assumes you have 10 or more states and a maximum of 10 or more counties in any state.  If there are 9 or fewer counties in all the states, and assuming you have no missing data, in your sample you can multiply by 10 instead of 100.

compute location = state * 100 + county.

Not quite sure how to use Richard's string as a new value label for the resulting numeric variable.


John F Hall

[hidden email]
www.surveyresearch.weebly.com






-----Original Message-----
From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of PEI-CHUN CHAO
Sent: 27 May 2011 04:24
To: [hidden email]
Subject: Re: Combine fields

Just to answer a few questions.

The variable 'state' has values of 1, 2, 3, etc and that the value label
is 'NY' for state=1, 'DE' for state=2, etc.

The the numeric codes for counties repeat between states. So for the
regions my analysis covers, we do have an Erie, NY and Erie, PA.


Peggy P.C. Chao
Marketing & Communications
M&T Bank
One M&T Plaza
Buffalo, NY14203
716-842-5647

M&T Bank - "Understanding What's Important."
>>> Richard Ristow <[hidden email]> 05/26/11 4:16 下午 >>>
At 02:58 PM 5/26/2011, PEI-CHUN CHAO wrote:

>I have two fields in my spss data file. One is state and the other
>is county. They are in numeric value and coded as the examples below:
>State
>1. NY
>2. DE
>3. PA
>
>County
>1. Albany
>2. Philly
>3. Erie
>4. Sussex
>
>I'd like to combine these two fields and create a new variable to
>show the "county, state" for each record such as...
>Albany, NY
>Erie, NY
>Sussex, DE
>Philly, PA


*If* the numeric codes for counties are unique across states (that
is, New York and Pennsylania don't both have counties numbered '1'),
and if the states' postal codes for ('NY', 'PA') and the counties'
names are already the value labels for their respective numeric
variables "State" and "County", then this should work (though untested):

STRING  CountyName (A20).

COMPUTE CountyName = CONCAT(RTRIM(VALUELABEL(County)),
                             ', '                     ,
                             VALUELABEL(State)        ).

But more likely county numbers do repeat between states. In that
case, you'll need an auxiliary file that's a table of state codes and
county names, indexed by the combination of a state and a county
number, and use (probably) a SORT CASES and MATCH FILES to look up
the postal codes and county names from the numeric values you have.

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


************************************
This email may contain privileged and/or confidential information that is intended solely for the use of the addressee.  If you are not the intended recipient or entity, you are strictly prohibited from disclosing, copying, distributing or using any of the information contained in the transmission.  If you received this communication in error, please contact the sender immediately and destroy the material in its entirety, whether electronic or hard copy.  This communication may contain nonpublic personal information about consumers subject to the restrictions of the Gramm-Leach-Bliley Act and the Sarbanes-Oxley Act.  You may not directly or indirectly reuse or disclose such information for any purpose other than to provide the services for which you are receiving the information.
There are risks associated with the use of electronic transmission.  The sender of this information does not control the method of transmittal or service providers and assumes no duty or obligation for the security, receipt, or third party interception of this transmission.
************************************

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