# Parametric or non parametric test

I want to compare trends of R&D expenditures before and after a crisis. I was planning to use a paired T-test or a non-parametric alternative. But, before of that, I tested the data for normality. My findings are that the normality test shows one variable to be normal, and other to have a non-normal distribution. So, my question is should I use a paired T-test or an alternative. You can see results in the table.

               Kolm.Smirn Stat(p)   Shapiro-Wilk Stat(p)
Before crisis   0.131(0.200)            0.994(0.992)
After crisis    0.431(0.003)            0.697(0.009)


I would like to compare R&D expenditures before and after the crisis. So, I create the sample on this way: 2004 2005 2006 2007 2008 -> values of R&D expenditures and these values are arranged in a first column: In the second column I put values of R&D expenditures after the crisis, 2008, 2009,2009,2010,2011,2012. So my question is, can i use the rule which says if you have a greater median than mean, you should use non-parametric, and if you have a greater mean than the median, you use parametric test.Also, can I use the rules about small samples, which say that is better to use non-parametric test for samples which a number of observation is less than 30?

Thank you all for the answer. I have 10 countries and I would like to test if there is any significant difference in each of these countries in the level of R&D expenditures before and after the crisis. For example,

the first country is SERBIA and I create data on this waY: 2004 2005 2006 2007 2008 - amounts of R&D expenditures in these years will be before crisis values, and 2008 2009 2010 2011 2012 should be amounts of R&D expenditures after the crisis. So, my sample is small, so can I use the rule according to which we compare median and mean and according to this, we choose between parametric or non-parametric test. If mean greater tha n we use parametric, and if the median is higher than mean, we choose non-parametric. Second, can I refer to the rule on small samples where an abnormal distribution is assumed?

• Is this a cross sectional study? i.e. the expenditures are from different firms in the same time period May 17, 2019 at 13:50
• No, i compare R&D expenditures in one country but before crisis 2004-2008(first pair), and after crisis 2008-2012 (second pair).
– user248229
May 17, 2019 at 14:07
• How many data points contribute to before and after crisis? May 17, 2019 at 15:24
• Normality of the pre-post sample $\ne$ normality of the paired differences. One would calculate the differences first then test for normality. May 17, 2019 at 15:26
• You can't arbitrarily pair data from a "pre" period and "post" period. You could pair time series from several government departments, like military, industry, aerospace, agriculture, etc. but not a handful of points in time. May 17, 2019 at 15:28

## 1 Answer

You have an autocorrelation issue. It is highly probable that the expenditures will be persistent. So, your samples are not random, hence t-test results are questionable. As would be questionable any tests that do not account for autocorrelation. Therefore, the first order of business for you is to test for autocorrelation.

Suppose, that you think that the process is $$x_t=c+\phi_1x_{t-1}+\varepsilon_t$$ A simple way to test your hypothesis would be to define the dummy as: $$a_t=\begin{cases} 0, & \mbox{if } t<2007 \\ 1, & \mbox{if } t\ge 2007 \end{cases}$$ then the process becomes $$x_t=c+\alpha a_t+\phi_1x_{t-1}+\varepsilon_t$$ If there was an impact of recession then $$\alpha$$ is significant, and the long term mean $$E[x_t]$$ is shifted by $$\frac \alpha {1-\phi_1}$$ after 2007

• Thank you, and whatshould i do after autocorrelation? Should i transfor variables in log?
– user248229
May 17, 2019 at 14:16
• And i want to compare groups not to use regression
– user248229
May 17, 2019 at 14:17
• You need to find out what is R&D expenditures' process. whether it's random walk type or ARMA type or something else. For random walk you do log diff, then analyze the changes in the process before and after. I'd look up the literature on the subject, other guys must have done this type of study already. if you want to publish you need to know what are the accepted techniques in these studies, controls etc. May 17, 2019 at 14:19
• @NikolaVasilic regression does compare groups. Focus on the interpretation of the regression parameters. Interrupted time series would be a powerful test in your data analysis. May 17, 2019 at 15:25