I have a dataset. y: the dependent variable (representing a ratio between the number of objects bought with the given money & the total number of objects bought) x: the independent variable (representing the amount of money given).

My goals for this analysis is trying to determine whether there is a significant relationship between x & y. Hence mainly testing the following hypothesis:

  1. Whether x=0 will imply y=0 (or for the very least, not significantly different from 0)
    • This is because we would expect if there is no money,nothing will be bought. But of course, since people can share the given money with another person, there is a possibility of y not being 0)
  2. Whether x & y are significantly related to one another

To achieve this, I am trying to determine the best transformation of x and y to fit the best linear model in R. So, the final model I got is $\sqrt y$ against ln(x). This is the only model that I've tried so far where the residuals assumptions are satisfied, no patterns in the residuals vs fitted plot. I am not sure if it is because the small dataset that I have is causing the problem.

When I fit the model in R, I obtain the following for the coefficients:

            Estimate Std. Error t value Pr(>|t|)
(Intercept) 0.319615   0.028743   11.12 2.93e-10 ***
x           0.150139   0.009959   15.08 9.76e-13 ***


The problem with this model is I can't test for hypothesis 1 as ln(x) is basically undefined at 0. Also, my x involves values between 0 to 1 which cannot be explained by the model. I am thinking of refitting the model for smaller values of x.

Would be very thankful if anyone could provide some help.

  • 1
    $\begingroup$ (1) Before doing anything, draw a scatterplot. (2) Since your data do not include or even overlap the case $x=0$, drawing conclusions about that situation will be a statistical extrapolation requiring a leap of faith. (3) For various reasons (which could be determined a priori), your choice of re-expressions of $x$ and $y$ is a good one. But of course it cannot be extrapolated to $x=0$, because by the time the natural log of $x$ is around $-2$ (that is, $x$ is about $0.1$), the predicted value of $y$ will be zero. One solution is to analyze the original counts rather than the ratios. $\endgroup$ – whuber Sep 19 '14 at 22:03

Your Answer

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

Browse other questions tagged or ask your own question.