Login  Register

computing a variable when the data is in long format

Posted by Carol Ma on Jun 02, 2015; 2:41am
URL: http://spssx-discussion.165.s1.nabble.com/computing-a-variable-when-the-data-is-in-long-format-tp5729702.html

Hi there,

Is anyone please able to help me with syntax to calculate a new variable? I have a dataset with 3 repeated measures, which I have already converted to long format. However, I have now realised that I probably should be adjusting my between group repeated measures analyses for baseline values. Thus I need to create a new variable with just the baseline values in it, to use as a covariate in the analysis.

Thus I need a new column, with just the timepoint 1 value, repeated three times, for each participant. Is there a way of doing this without coverting back to wide format, calculating the variable, and reconverting to long format?

thanks for any help you are able to offer,

Carol

PS I am using SPSS 22