15
$\begingroup$

I have a set of data, $y$ and $x$. I would like to test the following hypothesis: There is a peak in $y$; that is as $x$ increases, $y$ first increases and then decreases.

My first idea was fitting $x$ and $x^2$ in a SLR. That is, if I find that the coefficient before $x$ is significantly positive and the coefficient before $x^2$ is significantly negative, then I have support for the hypothesis. However, this only checks for one type of relationship (quadratic) and may not necessarily capture the existence of the peak.

Then I thought of finding $b$, such a region of (sorted values of) $x$, that $b$ is between $a$ and $c$, two other regions of $x$ that contain at least as many points as $b$, and that $\bar{y_b}>\bar{y_a}$ and $\bar{y_b}>\bar{y_c}$ significantly. If the hypothesis is true, we should expect many such regions $b$. Thus, if the number of $b$ is sufficiently large, there should be support for the hypothesis.

Do you think I am on the right track to find a suitable test for my hypothesis? Or am I inventing the wheel and there is an established method for this problem? I will greatly appreciate your input.

UPDATE. My dependent variable $y$ is count (non-negative integer).

$\endgroup$
1
  • $\begingroup$ Does $y$ vary smoothly with $x$? If so you could try fitting a model including a smoother (say a GAM) and then compute first derivatives of the fitted smoother and their confidence interval. If the derivative is signif increasing then signif decreasing you have an answer. $\endgroup$ Jul 31, 2012 at 13:34

2 Answers 2

6
$\begingroup$

I was thinking of the smoothing idea also. But there is a whole area called response surface methodology that searches for peaks in noisy data (it does primarily involve using local quadratic fits to the data) and there was a famous paper I recall with "Bump hunting" in the title. Here are some links to books on response surface methodology. Ray Myer's books are particularly well-written. I will try to find the bump hunting paper.

Response Surface Methodology: Process and Product Optimization Using Designed Experiments

Response Surface Methodology And Related Topics

Response surface methodology

Empirical Model-Building and Response Surfaces

Although not the article I was looking for, here is a very relevant article by Jerry Friedman and Nick Fisher that deals with these ideas applied to high-dimensional data.

Here is an article with some online comments.

So I hope you at least appreciate my response. I think your ideas are good and on the right track but yes I do think you might be reinventing the wheel and I hope you and others will look at these excellent references.

$\endgroup$
15
  • 4
    $\begingroup$ I wasn't among the downvoters, but Answers on SE sites are expected to be more than a link to content. Summarising the content or providing a summary response then linking to content for further details would be better. $\endgroup$ Jul 31, 2012 at 14:19
  • 3
    $\begingroup$ I'm upvoting this one because (1) it presents a good idea; (2) it does have some commentary; and (3) it is supported with some carefully chosen links, including to freely available material. Yes, it looks typographically bad, because the links could be more nicely formatted: but I hope people aren't weighing that aspect of answers heavily in their voting decisions! $\endgroup$
    – whuber
    Jul 31, 2012 at 14:22
  • 2
    $\begingroup$ @whuber I agree after being able to read it clearly due to the nice formatting by Procastinator. +1 as well. I think there is enough summary here and some topics are almost too complex for anything more than the fundamental idea and a reference for further reading. $\endgroup$
    – Erik
    Jul 31, 2012 at 14:31
  • 6
    $\begingroup$ @MichaelChernick Note that wasn't a criticism from me, just offering a reason why people might have down voted. I would disagree with them if that was the reason because I think your answer is spot on, especially with PRIM; I was just consulting my Hastie et al (2009) as to what it said on PRIM. You might want to add that link to the Answer as there are two sections on PRIM there and the PDF is available for free. $\endgroup$ Jul 31, 2012 at 14:42
  • 1
    $\begingroup$ @Nikita What is the formal statistical hypothesis that you want to test? First you have to find the peaks which is a big part of this. Are you testing that the peak is not just a result of noise? I am not sure what literature there is to solve this problem but my thought would be that you could fit a polynomial regression to the data (perhaps a quadratic locally). From that you would have an estimate of the residual variance. The statistical significance of the quadratic term would be a test for significance of the peak. $\endgroup$ Aug 2, 2012 at 13:32
1
$\begingroup$

Even though you have not answered my question, if my guess is right you are looking for a test of white noise which amounts in the frequency domain to show that spectrum is flat. So Fisher's periodogram test which in this reference is called Fisher's kappa could be used. See the link.

http://www4.stat.ncsu.edu/~dickey/Spain/pdf_Notes/Spectral2.pdf

Bartlett's test is also mentioned in the reference. Now rejecting the null hypothesis amounts to finding a significant peak in the periodogram. This would mean that a periodic component exists in the time series.

Because the test is in the frequency domain and involves periodogram ordinates the ordinate have a chi square 2 distribution under the null hypothesis and are independent. This special distribution comes about only because of the transformation to the frequency domain. If x were time this would not work in the time domain or in general the distribution for the ys would not be independent chi square.

But take the model y=constant independent of x. Use the y$_m$, the mean of the ys as the estimate for the constant. Then testing for the existence of a peak would amount to rejecting that the residuals form a white noise sequence.

$\endgroup$
4
  • $\begingroup$ The more I ask on this website, the more I learn =) , this time about white noise tests and about the need for me to give sufficient information in my questions. I am sorry about not answering your question promptly earlier. I think white noise tests for residuals would be suitable when the errors are normally distributed, but my dependent variable $y$ is actually count. So I would not expect to see white noise in residuals in any case. Or am I missing something? $\endgroup$ Aug 4, 2012 at 5:08
  • $\begingroup$ So y is count data and what is x a continuous explanatory variable? My previous suggestions probably don't in that case but there is a lot of recent literature on count models. So if you can be a little more specific about the data and the problem maybe i can point to a solution. $\endgroup$ Aug 4, 2012 at 13:53
  • $\begingroup$ Yes, $y$ is count, $x$ is continuous (but non-negative). Not sure what other pieces of information would be important. $\endgroup$ Aug 5, 2012 at 2:05
  • $\begingroup$ I am not sure whether or not this will help but Cameron and Trivedi published a book on count regression models and have a second edition coming out in 2013. Here is a link with some information: cameron.econ.ucdavis.edu/racd/count.html $\endgroup$ Aug 5, 2012 at 4:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.