- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
HI,
Just wondering if someone can help. I'm trying to import weighted data from SPSS into SAS. The file imports, however, the weighted data does not import properly and the original sample size remains. I've tried to find this info in user manuals, but can't seem to find anything. Any ideas what I'm doing wrong?
thanks
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Weighted data typically just means you have a column(s) of weights for your data. It doesn't affect the number of observations. Any proc using the data will have a WEIGHT statement where you provide the weight variable and then the analysis will factor in the weights.
It does not change your input data or data structure in any fashion.
@kristenl wrote:
HI,
Just wondering if someone can help. I'm trying to import weighted data from SPSS into SAS. The file imports, however, the weighted data does not import properly and the original sample size remains. I've tried to find this info in user manuals, but can't seem to find anything. Any ideas what I'm doing wrong?
thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
The file imports, however, the weighted data does not import properly and the original sample size remains.
As far as I know, the data should not change when importing from SPSS to SAS, so I don't know what the above means. Can you explain this further? Can you give a small example?
Also, how are you doing this "import"?
Paige Miller
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Thanks so much for your reply. My (edited) SAS syntax is below. In the SPSS file, I have applied weights. The weighted sample is 158,000; however, after importing it into SAS, I only have the original (non-weighted) sample of 7590.
PROC IMPORT OUT=OIS.finalweighted
DATAFILE="C:\Users\...NEW_weighted.sav"
DBMS=SPSS REPLACE;
RUN;
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
@kristenl wrote:
Thanks so much for your reply. My (edited) SAS syntax is below. In the SPSS file, I have applied weights. The weighted sample is 158,000; however, after importing it into SAS, I only have the original (non-weighted) sample of 7590.
Do you mean that the SPSS file had 158000 records, while the SAS file has 7590 records? What does "weighted sample" mean with respect to a data set? If there is a weight variable, what happens if you add up all the weights?
Paige Miller
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
However, Reeza is suggesting that weighted data in SPSS is not altered, which makes sense considering the small sample in SAS.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
It seems to me that SPSS syntax for specifying what variable to use for weighting is very similar to the SAS syntax.
https://libguides.library.kent.edu/SPSS/WeightCases
https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.3/statug/statug_freq_syntax13.htm
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Great, thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Weighted data typically just means you have a column(s) of weights for your data. It doesn't affect the number of observations. Any proc using the data will have a WEIGHT statement where you provide the weight variable and then the analysis will factor in the weights.
It does not change your input data or data structure in any fashion.
@kristenl wrote:
HI,
Just wondering if someone can help. I'm trying to import weighted data from SPSS into SAS. The file imports, however, the weighted data does not import properly and the original sample size remains. I've tried to find this info in user manuals, but can't seem to find anything. Any ideas what I'm doing wrong?
thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content