Search icon
Subscription
0
Cart icon
Close icon
You have no products in your basket yet
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
R Statistics Cookbook

You're reading from  R Statistics Cookbook

Product type Book
Published in Mar 2019
Publisher Packt
ISBN-13 9781789802566
Pages 448 pages
Edition 1st Edition
Languages
Concepts
Author (1):
Francisco Juretig Francisco Juretig
Profile icon Francisco Juretig

Table of Contents (12) Chapters

Preface 1. Getting Started with R and Statistics 2. Univariate and Multivariate Tests for Equality of Means 3. Linear Regression 4. Bayesian Regression 5. Nonparametric Methods 6. Robust Methods 7. Time Series Analysis 8. Mixed Effects Models 9. Predictive Models Using the Caret Package 10. Bayesian Networks and Hidden Markov Models 11. Other Books You May Enjoy

Finding the best transformations via the acepack package

When fitting linear regressions models, we always want them to fit as best as possible into the data. Sometimes, we want to transform our variables in order to get the model fit to improve as much as possible. For example, we could apply several transformations (taking logarithms, squared values, and so on) in order to improve the fit.

The acepack package implements the alternating conditional expectation algorithm, which finds the optimal transformations that we need to apply to our data in order to maximize the R2. Another way of looking at this would be: given the data that we have, what would be the best R2 we could get if we found the best possible transformations? In this fashion, we could get a maximum boundary on the best model that we would be able to get, assuming we can only transform the variables to capture...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}