Announcement

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

  • #31
    Thank you for taking the time to help me Philips, worked like a charm. Now I just need to convert the other years to STATA and do the same thing = )

    Thanks for the information Nick. I just created an account so I could ask Prof. Richard about the PISA-files so didn't read anything ells. I will try to contact them about the name.

    Comment


    • #32
      Hello again Philip (or anyone else that is skilled with STATA),

      I ran in to some problems with the "pv-command" that i hoped you could help me with. I used it to calculate gender differences last time, which worked really well, but now I cant figure out how to preform a simple t-test between their scores and I have the same problem with "sdtest" (I want to test if there is a significant differences in standard deviation).

      The second problem I have is that I would like to calculate the proportion/number of students at different percentiles (e.g. number of ppl scoring above the 95th percentile) but cant seem to find a way to do it with this type of data. Do you have any suggestions?

      Sincerely
      Mikael

      Comment


      • #33
        A very late answer Richard Williams (#14) and Konrad Zdeb (#15): usespss has two disadvantages: If I am correct it only works with 32-bit versions of Stata and (more importantly) it will drop labels of missing values (I don't know whether Stat/Transfer keeps them, the last time I tried was several years ago and that version of Stat/Transfer dropped them, as well) and R will lump the missing values into one single missing value which becomes sysmis (.) when exporting the file to Stata.

        Here is a preliminary solution for users of Windows (I will write an .ado-program for SSC as soon as time permits):
        1. Install the free program Nesstar-Publisher (see http://www.nesstar.com/software/publisher.htm) and install SPSS data (via "File" -> "Import Study") -- if asked to correct "measure definitions" choose "no" -- and subsequently export the data (via "File" -> "Export dataset(s)") into a Stata file (version 8). Although missing labels values will be dropped, apart from the .dta-file Nesstar-Publisher will create a textfile with the extension .missRecode that shows which missing values of SPSS were transformed into which of Stata's extended missing values plus the information about the original value labels of these missing values in SPSS.
        2. Run the Stata .do-file shown below (after having adapted the pathname and the filename of the .dta and .missRecode files -- note that both files will have the same name but different name extensions). The .do-file will read the .missRecode file created by Nesstar-Publisher, will create a Stata .do-file to label the extended missing values of Stata, and will apply this .do-file to the data file exported by Nesstar-Publisher (after that you only have save the data containing labeled missing values).
        Code:
        /* Label missing values of SPSS data exported to Stata data (.dta)
           by Nesstar Publisher using information in .missRecode-file created
           during export
        
           see: http://www.nesstar.com/software/publisher.html
        
           version 1.1.0 -- Dirk Enzmann -- May 06, 2016
        */
        
        global dpath = "c:/Project/Pisa/Data/" // adapt path to your situation
        global fname = "PisaData"              // adapt to .dta and .missRecode filename
        
        * ------------------------------------------------------------------------------
        qui {
          clear
          import delimited "${dpath}${fname}.missRecode", delimiter(space, collapse)
          tempfile misslab
          drop if _n==1
          drop if v1=="Orig."
        
          qui d, s
          local vars = r(k)
          if `vars' > 3 {
            forvalues i = 3/`=`vars'-1' {
              local n2 = `vars'-`i'+3
              local n1 = `vars'-`i'+2
              replace v`n1' = v`n1' + " " + v`n2' if v`n2' != ""
              drop v`n2'
            }
          }
          replace v2 = strlower(v2)
        
          local N = r(N)
          local num = 0
          forvalues i = 1/`N' {
            local ii = `N'-`i'+1
            if real(v1[`ii']) < . local ++num
            else if `num' > 0 {
              forvalues j = 1/`num' {
                replace v2 = v2[`=`ii'+`j''] + `" ""' + ///
                             v3[`=`ii'+`j''] + `"" ///"' ///
                             if _n == `ii'+`j'-1 & (`j' < `num')
                replace v2 = v2[`=`ii'+`j''] + `" ""' + ///
                             v3[`=`ii'+`j''] + `"", modify"' ///
                             if _n == `ii'+`j'-1 & (`j' == `num')
                replace v1 = "      " if _n == `ii'+`j'-1 & (`j' > 1)
              }
              replace v1 = "la de " + v1 + " " if _n == `ii'
              drop if _n == `ii'+`num'
              local num = 0
            }
          }
          drop v3
          outfile using `misslab', replace runtogether
        }
        use "${dpath}${fname}.dta", clear
        do `misslab'
        Last edited by Dirk Enzmann; 05 May 2016, 17:04.

        Comment


        • #34
          Dirk Enzmann : Sergiy Radyakin does have a beta 64-bit version of usespss (net from http://radyakin.org/transfer/usespss/beta).It has worked very well on the occasions I've used it and and it definitely keeps both the variable and value labels--including labels for missing values (it codes missing values that have labels as extended missing, so system missing value 888888 with label DK in SPSS will be coded as: .a [888888] DK in Stata).
          Last edited by Carole J. Wilson; 05 May 2016, 17:25.
          Stata/MP 14.1 (64-bit x86-64)
          Revision 19 May 2016
          Win 8.1

          Comment


          • #35
            Carole J. Wilson : Thanks a lot for this information -- I did not know.

            I installed it via
            Code:
            net install usespss, from(http://radyakin.org/transfer/usespss/beta)
            Using
            Code:
            which usespss
            results in
            Code:
            c:\ado\plus\u\usespss.ado
            *! version 2.0.1  28sep2012
            *! Sergiy Radyakin 2007-2012
            *! c0b14cbe-8fca-441e-bafd-0c0470fd8cd5
            showing a date I of which I am not sure whether it is correct. But fact, it also works with the 64-bit version of Stata 14.1. And as you said, it is able to transform up to three missing values of SPSS into Stata's extended missing values by keeping its labels -- but only if there are not more than 3 missing values defined in SPSS.

            If more than 3 labeled missing values are defined in the SPSS dataset, it will lump all of them together into a single missing value in Stata and will label it with the label of the largest missing value of the SPSS dataset. For example, when I import SPSS data having the following original frequencies in SPSS
            Code:
                 Value label   Value    Freq   % Total   % Valid
                                   0    2090       3.1      80.0
                                   1     447       0.7      17.1
                                   2      49       0.1       1.9
                                   3      11       0.0       0.4
                                   4       9       0.0       0.3
                                   5       5       0.0       0.2
                                   6       1       0.0       0.0
                               Total    2612       3.8     100.0
            Missing
                        > 52     996       2       0.0      MISS
            ambiguous answer     997      52       0.1      MISS
              not applicable     998   62862      91.8      MISS
                   no answer     999    2979       4.3      MISS
            Total                      68507   100.0
            I will get the following frequencies in Stata (using fre from ssc):
            Code:
            . fre vcrobbna
            
            vcrobbna -- inc robbery notified (adapt.)
            -----------------------------------------------------------------------
                                      |      Freq.    Percent      Valid       Cum.
            --------------------------+--------------------------------------------
            Valid   0                 |       2090       3.05      80.02      80.02
                    1                 |        447       0.65      17.11      97.13
                    2                 |         49       0.07       1.88      99.00
                    3                 |         11       0.02       0.42      99.43
                    4                 |          9       0.01       0.34      99.77
                    5                 |          5       0.01       0.19      99.96
                    6                 |          1       0.00       0.04     100.00
                    Total             |       2612       3.81     100.00           
            Missing .a [999]no answer |      65895      96.19                      
            Total                     |      68507     100.00                      
            -----------------------------------------------------------------------
            Admittedly, it is only (a perhaps older) beta-version of usespss. But if we are now starting a discussion of the problems of usespss we should open a new thread.

            Comment


            • #36
              Dear friends and colleagues,

              I need some help walking me through the process of downloading a PISA TXT datafile then have SPSS read it properly and then apply the SPSS control file. Is this the right procedure because it has not worked for me so far. Perhaps I am making the wrong selections on the SPSS wizard to read text files. Can anyone guide me through this please?

              Mike


              Comment


              • #37
                Umm, this is a Stata forum, not an SPSS forum. Did you mean to ask this here? Certainly there are people here who also use SPSS, but wouldn't you be likely to get a better and quicker response on an SPSS forum?

                Comment


                • #38
                  Dear Clyde,

                  The reason I asked the STATA gurus was because I had not gotten anything on the other side. But after thinking about it, I figured it out by myself! What can I say...Closed doors make wonders sometimes...I now have the complete 2012 PISA dataset, all 480,174 cases of them in .sav format. Thanks all the same for your kind remark.

                  Comment


                  • #39
                    I found this site and I belief it could be useful for those who work with the PISA dataset (it includes the data from 2000 to 2015)...Good luck

                    http://www.evidenceinstitute.eu/?page_id=599

                    Comment


                    • #40
                      Hi, we moved PISA data to another folder:

                      https://www.evidenceinstitute.eu/data/

                      You can also download there the newest version of PISATOOLS package. Let us know if you have any requests or questions regarding PISA data or analysis.

                      Best

                      Maciej

                      Comment


                      • #41
                        People periodically find this thread and then write to me because most of the links are now broken. The links people are likely to want are


                        https://www.oecd.org/pisa/data/

                        https://www.evidin.pl/en/data/


                        I also converted a bunch of the Pisa 2012 files some years ago from SPSS to Stata. The above links are probably much better, but if for some reason they are problematic you can also check out


                        https://drive.google.com/drive/folde...Zm_cTMR1LFwjUg
                        -------------------------------------------
                        Richard Williams, Notre Dame Dept of Sociology
                        StataNow Version: 19.5 MP (2 processor)

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

                        Comment

                        Working...
                        X