Announcement

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

  • Converting STATA files to SPSS

    Hi Family,
    I tried converting my data from Stata to SPSS , but this is the error I got.

    Saving 208 observations of 458 variables into C:\Users\user\Desktop\Nuru\SHAM_SPSS_Clean_WITH do
    > file effective\fINAL_journy\Dataset_dofile\women_youth_ final.sav
    Variable _registeryourlocalisation_lati was renamed to @registeryourlocalisation_lati. Why?
    Variable _registeryourlocalisation_long was renamed to @registeryourlocalisation_long. Why?
    Variable _registeryourlocalisation_alti was renamed to @registeryourlocalisation_alti. Why?
    Variable _registeryourlocalisation_prec was renamed to @registeryourlocalisation_prec. Why?
    _savespss_checkvars(): 3333 Variable names duplicates due to case-insensitivity of SPSS: Pl
    > easespecify
    savespss(): - function returned error
    <istmt>: - function returned error
    r(3333);

    Below is the command I used:
    savespss "C:\Users\user\Desktop\Nuru\SHAM_SPSS_Clean_WI TH dofile effective\fINAL_journy\Dataset_dofile\women_youth_ final.sav"

    I tried the alternative by using the link that was share sometime back on this vibrant community group.
    https://gallery.shinyapps.io/rioweb/
    Though it has successfully converted the file, when you click to open the converted SPSS file it does not open. I waited for several hours, and it is still silent; it can't open.
    Please I need your support.

    Thank you all.
    Amidu.

  • #2
    -help import spss- refers to -export spss- command. Does that command work for you?

    Comment


    • #3
      Hi Stephen,
      Sorry, It didn't work for me sir, maybe I did something wrong or missed the command.

      This is how I attempted based on your response,
      I open my stata file with name "sham."
      to convert sham in stata
      I type " export spss shamnewdata" and got and error

      export spss shamnewdata
      export: unknown subcommand "spss"
      r(198);

      Can you please through more light on that for me?
      Thank you.



      "newdata" this the file name I want to store in stata.
      But I didn't get it rigt.

      Comment


      • #4
        Shamsudini Amidu, why do you want to save your data files as .SAV files? If it is to make them accessible to SPSS users, please note that SPSS has long had the ability to open Stata data files. HTH.
        --
        Bruce Weaver
        Email: [email protected]
        Web: http://sites.google.com/a/lakeheadu.ca/bweaver/
        Version: Stata/MP 18.0 (Windows)

        Comment


        • #5
          You are probably not using Stata 18. You should tell us you are using an outdated Stata version. export spss was added in version 18 and older versions of Stata are unaware of that (sub-)command; hence the error message.

          You have at least three options now:

          1. Get access to (e.g., by purchasing) the latest version of Stata, version 18.
          2. Contact the author of savespss (Sergiy Radyakin) and ask for help.
          3. Contact the people behind rioweb and ask for help.

          Other alternatives include the commercial software StatTransfer or open-source alternatives, e.g. R's foreign.

          As your post in #3 implies access to SPSS, you could probably forget about all the above and simply import the Stata dataset into SPSS, which should be able to read it (Edit: which is basically what Bruce has suggested simultaneously).
          Last edited by daniel klein; 21 Jan 2024, 07:41.

          Comment


          • #6
            Hi family,
            Sorry for the late reply.
            I do appreciate all your guidance and all your other crucial contributions. I am most grateful to you all.
            I tried the earlier suggestion @Stephen and got it.
            These is the procedure I follow for other members to benefit:

            How to Convert Stata to SPSS
            1. In the command menu, type “help export spss.”
            2. Click on the link
            dta2sav from http://fmwww.bc.edu/RePEc/bocode/d
            1. Click to download the file (dta2sav)
            2. Now type dta2sav at the command menu and you have your SPSS syntax
            3. Now run the spss syntax to have your Spss data(sav)
            I will also try to import it to SPSS.

            Thank you once again. May God continue to bless us all.

            Sham.

            Comment

            Working...
            X