Help using Base SAS procedures

PLEASEHELP!!!!!!!!!!!!!!!! Merging one-to-many datasets

Posts: 1

PLEASEHELP!!!!!!!!!!!!!!!! Merging one-to-many datasets

I am in desperate need of help! I am trying to merge two psychology data sets: one with 40 records per subid and one with one record per subid. The dataset with the one record per subid is demographic information. When I merged the data sets using proc sort, I was successful in doing so. However, for the analyses, when I went to run a MANOVA between my independent and dependent variables, the demographic varibales were counted 39 extra times per subid when they should only count once per subid. In other words, with 302 participants I only want the demographic variables to count once even though the merged file will contain 40 records per subid. Any help would be greatly appreciated
Trusted Advisor
Posts: 2,113

Re: PLEASEHELP!!!!!!!!!!!!!!!! Merging one-to-many datasets

It would help if you shared your code. The set-up (40 records per subject) is appropriate for a repeated measures analysis (you would want the repeated records for the demographics and the REPEATED statement would take care of the actual sample size). If you are looking for a Multivariate ANOVA, with say 40 outcome measures per subject, then you need to reframe your data to get one (long) record per ID. You can do that by using PROC TRANSPOSE on the repeated records to stretch them out and then merging with the dmographics.

Doc Muhlbaier
Ask a Question
Discussion stats
  • 1 reply
  • 2 in conversation