Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • SPSS to STATA

    Hi users,

    I am new to STATA. Will it cause problems if I code, transform and create mean scores for my variables in SPSS.
    Then move this data to STATA for analysis. Is this suitable?

    I hope this makes sense.

    Best,

    Bibi
    Last edited by BIBI MASALA; 21 Jul 2020, 12:55.

  • #2
    Welcome to Statalist.

    My guess is you'll be fine. But, how do you plan to import or export the data? Read the documentation for the commands so you'll be aware of any limitations or things to be careful about.

    You could, of course, do all this coding and transformations from within Stata. You might prefer to do it in SPSS because you feel more comfortable with it, but whatever you want to do can probably easily be done in Stata too.

    If you provide more details -- size of data set, # of variables, versions of SPSS and Stata you will be using, software you will use to convert the data -- we might be able to advise you better.

    But if the question basically boils down to, can you create a data set in SPSS and then analyze it in Stata -- yes, you can. But if there is something complicated or esoteric about what you are doing, or if you don't have the right software, things could be more difficult.
    -------------------------------------------
    Richard Williams, Notre Dame Dept of Sociology
    StataNow Version: 19.5 MP (2 processor)

    EMAIL: [email protected]
    WWW: https://www3.nd.edu/~rwilliam

    Comment


    • #3
      Dear Richard,

      Many thanks for your response.

      Qualtrics (survey software) gives me the option to download my data set as an excel or SPSS file.
      I am more proficient with SPSS but have been advised to use STATA. I am stuck on how to create mean scores for some of my variables and recode variables. So, I thought I could do some of the groundwork in SPSS then finish off in STATA.

      Also, in STATA I have the option to upload SPSS files.

      My data set is 250 cases. I'm using STATA version 16 and SPSS version 26.

      I am planning to use logistic regression.

      - My DV is help-seeking which is on a 7-point Likert scale. I plan to recode this into a binary variable so that 1, 2, 3, 4 become 0's (low/negative help-seeking) and 5, 6, 7 become 1's (high/positive help-seeking).
      - 2 predictors are continuous on a 5-point Likert scale.
      - 1 predictor is categorical.


      Bibi
      Last edited by BIBI MASALA; 21 Jul 2020, 19:24.

      Comment


      • #4
        I wouldn't be inclined to dichotomize the ordered-categorical outcome variable, and I'd probably handle the two ordered-categorical explanatory variables as categories (using Stata's factor variables notation) instead of continuous, but you can do the preanalytical data manipulation entirely in Stata, along the lines of the following pseudocode.
        Code:
        generate byte dichotomy = help_seeking >= 5 if !mi(help_seeking)
        logit dichotomy c.(five_point1 five_point2) i.(categorical)
        Consider also
        Code:
        ologit help_seeking i.(five_point? categorical)
        contrast p.five_point?
        and examine the linear and higher-order components of the set of orthogonal polynomial contrasts.

        Comment


        • #5
          I am not following. Your response is too advanced for me and it's tells not found when I enter the commands.

          Comment


          • #6
            Pseudocode means "use your own variable names if different".

            Comment


            • #7
              Thank you!

              Comment


              • #8
                I tried to recode a bunch of items which did not work.
                So, then I tried with one item which worked. The new min and max looks correct.
                However, looking at the editor, it seems I've done it wrong.
                Attached Files

                Comment


                • #9
                  I think you need parentheses ( ) around your rule. What I see is that you are subtracting 1 from each variable which could be as simple as

                  Code:
                  foreach v of var GHQ* { 
                       replace `v' = `v'  - 1 
                  }

                  Comment


                  • #10
                    I ran this;

                    ​​​​​​ recode GHQ_1-GHQ_28 (1=0) (2=1) (3=2) (4=3)

                    but the data does not look correct editor. It still has not made the right changes.

                    Comment


                    • #11
                      Works for me:

                      Code:
                      . clear 
                      
                      . set obs 4 
                      number of observations (_N) was 0, now 4
                      
                      . gen GHQ_1 = _n 
                      
                      . gen GHQ_2 = 5 - _n 
                      
                      . 
                      . list 
                      
                           +---------------+
                           | GHQ_1   GHQ_2 |
                           |---------------|
                        1. |     1       4 |
                        2. |     2       3 |
                        3. |     3       2 |
                        4. |     4       1 |
                           +---------------+
                      
                      . 
                      . recode GHQ_* (1=0) (2=1) (3=2) (4=3)
                      (GHQ_1: 4 changes made)
                      (GHQ_2: 4 changes made)
                      
                      . 
                      . list 
                      
                           +---------------+
                           | GHQ_1   GHQ_2 |
                           |---------------|
                        1. |     0       3 |
                        2. |     1       2 |
                        3. |     2       1 |
                        4. |     3       0 |
                           +---------------+

                      Comment


                      • #12
                        Thank you!

                        Comment


                        • #13
                          I have another question. I ran chi-square but I noticed that the percentages do not add up to 100%. Is this normal?

                          Comment


                          • #14
                            New thread please... and show data, code, results.

                            Comment


                            • #15
                              Your concern about translating from SPSS to Stata is praiseworthy.

                              On account of that, this is just to remark the correct spelling of Stata, which has only the first letter in upper case.
                              Best regards,

                              Marcos

                              Comment

                              Working...
                              X