<p>It is difficult to know for certain what you are asking, but I also know that this difficulty is coming from the level of technical skill you are working at.  What I can help you with is a way to approach the question.  If I were you, I would choose another problem, however, let me give you some ideas that may work at your level of skill.</p>
<p>You appear to be working the problem backward.  You appear to be solving this problem as &quot;I have a toolkit that I know, let's run with the tools I know and then test if the assumptions fail after the fact.&quot;  This is analogous to, &quot;I went to Ace Hardware and bought a household toolbox. My assignment is to build a 100-story steel-framed, glass-surface skyscraper with it.  I will start building and see how it goes.&quot;</p>
<p>The correct solution would be to design the building and then work out the appropriate tools and materials.</p>
<p>All statistical problems can be thought of in terms of <span class="math-container">$$\max_{\hat{\theta}}-\mathcal{U}(\theta,\hat{\theta})$$</span> subject to some set of constraints such as model assumptions, where <span class="math-container">$\mathcal{U}$</span> is a utility function and <span class="math-container">$\theta$</span> is(are) the parameter(s).</p>
<p>Models like ordinary least squares impose what are sometimes non-trivial assumptions about how the world works.  The real question is whether or not you believe those assumptions to be actually true.  If you do, then ordinary least squares is the correct model to use.  Your auxiliary tests are telling you that your understanding of the world is probably wrong.</p>
<p>It appears your response has been to grab other toolkits but you didn't ask, &quot;are these assumptions the assumptions I actually believe?&quot;  When you change toolkits, you are altering the optimization problem.</p>
<p>The correct solution, not necessarily the valid solution, is for you to work through your real assumptions and then build a model from them.  As you do not have a doctorate in statistics, that would be grossly unfair to ask you to do.  The reason it is correct is that the model would match your understanding.  The reason it may be invalid is that your understanding could be wrong.  Your model may not match nature.  That is one of the goals of falsification, to determine how your model construction is wrong.</p>
<p>What I can do is give you two potential fixes.  You should, absolutely, read the papers that created the methods and determine if they fit your understanding.  They probably will not, but they are robust patches.  You are sewing a patch onto a hole, you are not buying new jeans.</p>
<p>The first choice would be Theil's regression.</p>
<blockquote>
<p>Theil, H. (1950), &quot;A rank-invariant method of linear and polynomial regression analysis. I, II, III&quot;, Nederl. Akad. Wetensch., Proc., 53: 386–392, 521–525, 1397–1412</p>
</blockquote>
<p>It is a median-based regression.  Since all probability distributions have a median, the method is robust to failures.  It is related to resampling methods.  It is locally but not globally optimal.  It solves a narrow problem that may not be your problem, but it is pretty robust to deviations from model assumptions.  It has a high breakpoint.</p>
<p>The second is Koenker's quantile regression. His, like Theil's, is not the only median regression.  There is a family of related tools.</p>
<blockquote>
<p>Koenker, Roger (2005). Quantile Regression. Cambridge University Press.</p>
</blockquote>
<p>Again, this is a locally, but not globally optimal solution. It is more sensitive to strong departures by data than Theil's regression.  Again, everything has a median.</p>
<p>There are small but non-trivial differences in their assumptions.  There are packages for both methods.  There are other methods in the literature that lack statistical packages.</p>
<p>Before you choose either method, I would seek advice from your advisor.</p>
<p>Finally, I am ignoring a giant problem with Bitcoin data that could be an insurmountable problem for you at your skill level.  Your data may not have stationary parameters.  They may change and do so in a way that is not contemplated in your models.  Your choice is to ignore this, get a lot of skill quickly, or abandon the problem.</p>
<p>Also, the predictions would never be something you would want to gamble money on.  As an academic exercise, a median-based method is a respectable patch to a set of serious departures from the standard set of assumptions.  If real money were involved, you would not want to do this.  You should construct your solution from the real problem.</p>

CC BY-SA 4.0
2022-05-18T04:26:18.793Z
2022-05-18T04:26:18.793Z
Dave Harris
<p>Hi I'm doing my undergraduate thesis, I want to predict closing price of Bitcoin using linear regression model, So i check the assumption using R then It is all not satisfied, so I want to fix It but I'm doing a hard time, I've tried data transformation, wls ,gls, but noting works, should I change my model? or should I'm not be using linear reg?</p>
<p>P.S. (I'm also doing time series, but my main focus is the linear regression)</p>
<p>P.S.S. (all assumptions of linear regression, I check it using gvlma() and performance() packages in R)</p>

CC BY-SA 4.0
2022-05-17T16:15:12.123Z
Which assumptions did you check using R?  Most research do not 'fix' all problems with regressions in these settings. They simple mitigate the problems.
RegressForward
CC BY-SA 4.0
2022-05-17T17:20:55.193Z
Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking.
Giskard
CC BY-SA 4.0
2022-05-18T02:52:58.830Z
all assumptions of linear regression, I check it using gvlma() and performance() packages in R
Paul Kionesala
<regression><cryptocurrency><r><bitcoin>
Best way to fix the assumptions in linear regression with cryptocurrency data?
Paul Kionesala
# Best way to fix the assumptions in linear regression with cryptocurrency data?

(Asked by: username_0 on 2022-05-17)

Hi I'm doing my undergraduate thesis, I want to predict closing price of Bitcoin using linear regression model, So i check the assumption using R then It is all not satisfied, so I want to fix It but I'm doing a hard time, I've tried data transformation, wls ,gls, but noting works, should I change my model? or should I'm not be using linear reg?

P.S. (I'm also doing time series, but my main focus is the linear regression)

P.S.S. (all assumptions of linear regression, I check it using gvlma() and performance() packages in R)

**Tags:** regression, cryptocurrency, r, bitcoin
> **Comments:**
> **username_1**: Which assumptions did you check using R?  Most research do not 'fix' all problems with regressions in these settings. They simple mitigate the problems.  
> **username_2**: Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking.  
> **username_0**: all assumptions of linear regression, I check it using gvlma() and performance() packages in R  

---

## 1 answers

### Answer by username_3 on 2022-05-18. Score: 1

It is difficult to know for certain what you are asking, but I also know that this difficulty is coming from the level of technical skill you are working at. What I can help you with is a way to approach the question. If I were you, I would choose another problem, however, let me give you some ideas that may work at your level of skill.

You appear to be working the problem backward. You appear to be solving this problem as "I have a toolkit that I know, let's run with the tools I know and then test if the assumptions fail after the fact." This is analogous to, "I went to Ace Hardware and bought a household toolbox. My assignment is to build a 100-story steel-framed, glass-surface skyscraper with it. I will start building and see how it goes."

The correct solution would be to design the building and then work out the appropriate tools and materials.

All statistical problems can be thought of in terms of $$\max\_{\hat{\theta}}-\mathcal{U}(\theta,\hat{\theta})$$ subject to some set of constraints such as model assumptions, where $\mathcal{U}$ is a utility function and $\theta$ is(are) the parameter(s).

Models like ordinary least squares impose what are sometimes non-trivial assumptions about how the world works. The real question is whether or not you believe those assumptions to be actually true. If you do, then ordinary least squares is the correct model to use. Your auxiliary tests are telling you that your understanding of the world is probably wrong.

It appears your response has been to grab other toolkits but you didn't ask, "are these assumptions the assumptions I actually believe?" When you change toolkits, you are altering the optimization problem.

The correct solution, not necessarily the valid solution, is for you to work through your real assumptions and then build a model from them. As you do not have a doctorate in statistics, that would be grossly unfair to ask you to do. The reason it is correct is that the model would match your understanding. The reason it may be invalid is that your understanding could be wrong. Your model may not match nature. That is one of the goals of falsification, to determine how your model construction is wrong.

What I can do is give you two potential fixes. You should, absolutely, read the papers that created the methods and determine if they fit your understanding. They probably will not, but they are robust patches. You are sewing a patch onto a hole, you are not buying new jeans.

The first choice would be Theil's regression.

> Theil, H. (1950), "A rank-invariant method of linear and polynomial regression analysis. I, II, III", Nederl. Akad. Wetensch., Proc., 53: 386–392, 521–525, 1397–1412

It is a median-based regression. Since all probability distributions have a median, the method is robust to failures. It is related to resampling methods. It is locally but not globally optimal. It solves a narrow problem that may not be your problem, but it is pretty robust to deviations from model assumptions. It has a high breakpoint.

The second is Koenker's quantile regression. His, like Theil's, is not the only median regression. There is a family of related tools.

> Koenker, Roger (2005). Quantile Regression. Cambridge University Press.

Again, this is a locally, but not globally optimal solution. It is more sensitive to strong departures by data than Theil's regression. Again, everything has a median.

There are small but non-trivial differences in their assumptions. There are packages for both methods. There are other methods in the literature that lack statistical packages.

Before you choose either method, I would seek advice from your advisor.

Finally, I am ignoring a giant problem with Bitcoin data that could be an insurmountable problem for you at your skill level. Your data may not have stationary parameters. They may change and do so in a way that is not contemplated in your models. Your choice is to ignore this, get a lot of skill quickly, or abandon the problem.

Also, the predictions would never be something you would want to gamble money on. As an academic exercise, a median-based method is a respectable patch to a set of serious departures from the standard set of assumptions. If real money were involved, you would not want to do this. You should construct your solution from the real problem.


---

