|
I have 2 datasets that I need to merge. But, I have a little issue.
In dataset #1, I have a DATE variable (APR 2000) in one field. In dataset#2, I have 2 separate NUMERIC variables (4),(2000) in two fields. What I need is to merge these numeric variables, and match the date variable. Could you please help me. Thanks Manny Estrada ===================== 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 |
|
At 05:25 PM 1/7/2008, Manny Estrada wrote:
>I have 2 datasets that I need to merge. But, I have a little issue. > >In dataset #1, I have a DATE variable (APR 2000) in one field. >In dataset#2, I have 2 separate NUMERIC variables (4),(2000) in two fields. > >What I need is to merge these numeric variables, and match the date variable. "APR 2000" has to be a string variable. Assuming that's how you want your month-year dates, something like this should work, though not tested. It assumes that, . The first dataset can be read as 'Dataset1', and the second as 'Dataset2' . The string variable in the first dataset is 'Date'; the numeric variables in the second dataset are 'Month' and 'Year'. GET FILE=Dataset2. STRING Date (A8). * Convert the numeric month into its three-letter . * abbreviation. This is a roundabout calculation, . * through an SPSS date value that is the first day . * of that month in the year 2000. . NUMERIC #Month (DATE11). COMPUTE #Month= DATE.MDY(Month,1,2000). COMPUTE Date = STRING(#Month,MONTH3). * Add the four-digit year to the field . COMPUTE Date = CONCAT(RTRIM(Date), ' ' , STRING(Year,F4)). * Now merge (I assume you mean adding cases), with . * only the string form of the date being kept. . * (Add /BY, /RENAME, etc., as you need to.) . ADD FILES /FILE=Dataset1 /FILE=* /DROP=Month Year. ===================== 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 |
|
I would like to estiamte a series of growth models with the linear mixed
model and save to the dats file each indiivudals growth parameters. I know how to do this with SAS proc mixed but wanted to see if I can do this with SPSS. A typical modelis as follows. mixed il6 with time /print=solution /method=ml /fixed = intercept time /random intercept time | subject(id) covtype(un). Thanks in advance for any help ===================== 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 |
| Free forum by Nabble | Edit this page |
