Weighting cases in logistic regression

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

Weighting cases in logistic regression

Kurt Taube
Is there any way to weight cases in SPSS logistic regression without manually repeating lines of data, or to allow the dependent variable to take a probabilistic value between 0 and 1 rather than just a binary 0 or 1?  (I know I can input successes and trials in probit but I haven’t been able to get the analysis to run.)

Thanks in advance.

Kurt Taube

Columbus, Ohio, USA
Reply | Threaded
Open this post in threaded view
|

Re: Weighting cases in logistic regression

Bruce Weaver
Administrator
Have you tried it?  Here's an example.  Modify the path on the GET FILE line as needed.


new file.
dataset close all.

GET FILE='C:\SPSSdata\1991 U.S. General Social Survey.sav'
 /keep = sex race region age.
dataset name raw.

compute male = sex EQ 1.
formats male(f1).
crosstabs sex by male.

LOGISTIC REGRESSION VARIABLES male
  /METHOD=ENTER race region age
  /CONTRAST (race)=Indicator
  /CONTRAST (region)=Indicator
  /PRINT=CI(95)
  /CRITERIA=PIN(0.05) POUT(0.10) ITERATE(20) CUT(0.5).

* Now aggregate the data, getting the count of cases for
* each combination of the variables (explanatory AND outcome).

DATASET DECLARE Agg.
AGGREGATE
  /OUTFILE='Agg'
  /BREAK=race region age male
  /Kount=N.

dataset activate Agg.
WEIGHT by Kount.

LOGISTIC REGRESSION VARIABLES male
  /METHOD=ENTER race region age
  /CONTRAST (race)=Indicator
  /CONTRAST (region)=Indicator
  /PRINT=CI(95)
  /CRITERIA=PIN(0.05) POUT(0.10) ITERATE(20) CUT(0.5).

* Compare the -2LL and coefficients etc from the two models.

Kurt Taube wrote
Is there any way to weight cases in SPSS logistic regression without manually repeating lines of data, or to allow the dependent variable to take a probabilistic value between 0 and 1 rather than just a binary 0 or 1?  (I know I can input successes and trials in probit but I haven’t been able to get the analysis to run.)

Thanks in advance.

Kurt Taube

Columbus, Ohio, USA
--
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
|

Automatic reply: Weighting cases in logistic regression

Kelly Vander Ley

I will be out of the office December 19th-26th, returning on the 27th. If you need immediate assistance please call the main office number 503/223-8248 or 800/788-1887 and an office assistant will ensure that your need is addressed. 

 

Kelly