Announcement

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

  • Testing for statistical significance of trends in proportion over time

    Hello,

    I have a simple question about testing for trends in proportion over time. I have data on how proportions of a variable: STRENGTH (coded as Low, Medium, and High) changed from years 1990-2000 (coded as variable YEAR). For example: In 1990, Low was 20%, Middle was 40%, High was 40%; in 1991, Low was 25%, Mid was 45%, High was 30%, etc for the subsequent years up to 2000 (with Low/Med rising and High falling throughout).

    How do I test whether this trend over time is statistically significant? I am not sure what statistical test to use, nor am I sure how to run it in Stata.

    Thanks for your help.
    Last edited by Ronald Smith; 14 Feb 2018, 13:15.

  • #2
    Ronald:
    welcome to this forum.
    My jerk-knee reaction would be to take a look at -ologit-.
    Kind regards,
    Carlo
    (StataNow 18.5)

    Comment


    • #3
      In addition to Carlo's suggestion, you could try one of the several brand-name nonparametric tests for trend that are available in Stata.
      Code:
      version 15.1
      
      clear *
      set seed `=strreverse("1430084")'
      
      quietly set obs `=2000 - 1990 + 1'
      generate int year = _n + 1989
      
      generate byte strength = runiformint(1, 3)
      
      ologit strength c.year, nolog
      
      // Cuzick
      nptrend strength, by(year)
      
      // Daniels
      spearman strength year
      
      // Mann-Kendall
      ktau strength year
      
      // Jonckheere-Terpstra [available from SSC: search jonter]
      jonter strength, by(year) continuity
      
      // Cox-Stuart
      sort year
      quietly drop if _n == (_N + 1) / 2
      generate byte half = _n > _N / 2
      quietly bysort half (year): replace year = _n
      quietly reshape wide strength, i(year) j(half)
      signtest strength0 = strength1
      
      exit
      See also this FAQ on StataCorp's website.

      Comment


      • #4
        Joseph Coveney
        hello sir,
        sir i want to test trend analysis year by year (for 10 years ) in my data .i want to use Mann–Kendall non-parametric test for trend analysis and to get Z-value ( p- value),
        sir i am using stata13, and i run the following codes to
        Code:
        xtset code year, yearly
        ktau  var1 var2 var3 var4 year
        i just got the correlation matrix,but i cant get z-value and (p-value),
        but when i am just runing this command for one variable then i get this result and z-value but no p-value
        Code:
         ktau  change_BS year
        
          Number of obs =    6993
        Kendall's tau-a =      -0.0046
        Kendall's tau-b =      -0.0072
        Kendall's score = -113194
            SE of score =  152938.017   (corrected for ties)
        
        Test of Ho: change_BS and year are independent
             Prob > |z| =       0.4592  (continuity corrected)
        sir could you please guide me that how can i run correct command for Mann–Kendall non-parametric test so that i can get both z-value and p-value for my 4 variables
        thank you in advance.
        Ayub













        Last edited by Ayub UOM; 30 Aug 2019, 05:01.

        Comment


        • #5
          Ayub:
          as far as -ktau- is concerned, you can get what you're interested via -ktau- -stats-, as you can see from the following toy-example:
          Code:
          . use "http://www.stata-press.com/data/r15/auto.dta"
          (1978 Automobile Data)
          
          . ktau price mpg, stats(taua taub score se obs p)
          
            Number of obs =      74
          Kendall's tau-a =      -0.3895
          Kendall's tau-b =      -0.4002
          Kendall's score =   -1052
              SE of score =     213.627   (corrected for ties)
          
          Test of Ho: price and mpg are independent
               Prob > |z| =       0.0000  (continuity corrected)
          
          .
          Kind regards,
          Carlo
          (StataNow 18.5)

          Comment


          • #6
            Carlo Lazzaro
            thank you so much sir for your very quick reply and kindness.sir i read a paper and they reported z-value as well as p-values in the last row in the following format in his descriptive statistic table for different trend varaiables.
            .
            Mann–Kendall test: Year-to-year variation in the number of board directors
            Z-value (p-value):
            0.34 (p = .735)
            sir if you don't mind could you please let me know how can i report yours above test values on this pattern for p-value and z-value?

            and i also tried this command and i get z-value as well as p-values but its not Mann-kendall test command
            Code:
            nptrend change_BS , by( year )
            
                      z  = -0.83
              Prob > |z| = 0.404
            as the authors mentioned in the paper that
            We carried out the Mann–Kendall non-parametric test for trend analysis. The null hypothesis is not rejected for the time series and no trends can be inferred from our data on year-to-year variation
            .
            OR
            sir could you please guide me that how can i get the correct command for getting the right result just like my base paper?
            Best regards sir
            Last edited by Ayub UOM; 31 Aug 2019, 03:51.

            Comment


            • #7
              Ayub:
              I do not think that Mann-Kendall test is available in Stata.
              I would stick with -ktau- as per Joseph Coveney excellent reply #3:
              Code:
               
               // Mann-Kendall ktau strength year
              Kind regards,
              Carlo
              (StataNow 18.5)

              Comment


              • #8
                also, see the following FAQ: https://www.stata.com/support/faqs/s...end/index.html

                Comment


                • #9
                  Rich Goldstein ​​​Rich Goldstein
                  Thank you so much for your time, nice suggestions and guidance.I will follow it accordingly .
                  Best regards

                  Comment

                  Working...
                  X