{"id":33228,"date":"2022-02-08T16:44:02","date_gmt":"2022-02-08T15:44:02","guid":{"rendered":"http:\/\/54.194.80.134.nip.io\/?p=33228"},"modified":"2022-02-09T15:49:38","modified_gmt":"2022-02-09T14:49:38","slug":"advanced-analytics-with-r","status":"publish","type":"post","link":"https:\/\/www.cubeserv.com\/en\/advanced-analytics-with-r\/","title":{"rendered":"Advanced Analytics with R: An Overview"},"content":{"rendered":"\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t\t\t\t\t

While the R programming language has been around since the early 90s, it has received a lot of fame and attention in the previous decade, mainly due to its vast range of functionalities related to statistical analysis and data science. A significant reason is that it doesn’t require a solid programming background for people to start using it.<\/p>

Continuing our series of analytics with R, today we’re going to explore advanced analytics with R. It will include topics like Regression Analysis with R and Time Series Forecast with R. If you want to check out the previous article based upon beginners’ level analytics, feel free to click\u00a0here<\/a>.<\/p>

So, let\u2019s start without any further ado.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t

\n\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"focussed\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t\t\t\t\t

Graph Plotting in R<\/h2>

Starting with the basics, let’s see all the different kinds of plots we can make in R.\u00a0 While plotting graphs is a relatively simple job and one might argue that it doesn’t qualify for advanced analytics, it’s essential to know the different kinds of plots available and when to use one according to the scenario. The outcomes they can provide in a few lines of code are sometimes more\u00a0 meaningful than the advanced analytics themselves.<\/p>

ggplot2 \u2013 Your Best Friend!<\/h3>

No matter what kind of plots you\u2019re looking to make in R, ggplot2 should always be your first choice. It\u2019s by far the most used package by R-programmers when plotting something.<\/p>

Let’s look at the different plots provided by the ggplot2 package and see for which applications they are suitable for. For demonstration purposes we will be using the famous Iris dataset<\/a>.<\/p>

So, let\u2019s fire up RStudio and start plotting!<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t

\n\t\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t\t\t
\n\t\t\t
\n\t\t\t\t\n\t\t\t\t\tinstall.packages(\"tidyverse\")\r\nlibrary(datasets)\r\ndata(\"iris\")<\/xmp>\n\t\t\t\t<\/code>\n\t\t\t<\/pre>\n\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-4992dae elementor-widget elementor-widget-spacer\" data-id=\"4992dae\" data-element_type=\"widget\" data-widget_type=\"spacer.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div class=\"elementor-spacer\">\n\t\t\t<div class=\"elementor-spacer-inner\"><\/div>\n\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-006e81d elementor-widget elementor-widget-text-editor\" data-id=\"006e81d\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<h3>1.\u00a0\u00a0\u00a0\u00a0\u00a0 Bar Graphs<\/h3><p>Bar graphs are the most mainstream kind of graphs used in analysis. They\u2019re used whenever you want to compare the values of different categories using vertical bars representing the values. These bars of varying height make the comparison very convenient. Here\u2019s an example viewing the sepal length of different species.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-c124730 elementor-widget elementor-widget-code-highlight\" data-id=\"c124730\" data-element_type=\"widget\" data-widget_type=\"code-highlight.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div class=\"prismjs-default copy-to-clipboard \">\n\t\t\t<pre data-line=\"\" class=\"highlight-height language-r \">\n\t\t\t\t<code readonly=\"true\" class=\"language-r\">\n\t\t\t\t\t<xmp>ggplot(data=iris, aes(x=Species, fill = Species)) + \r\ngeom_bar() + \r\n  xlab(\"Species\") +  \r\n  ylab(\"Count\") + \r\n  ggtitle(\"Bar plot of Sepal Length\")<\/xmp>\n\t\t\t\t<\/code>\n\t\t\t<\/pre>\n\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-2ac32df elementor-widget elementor-widget-image\" data-id=\"2ac32df\" data-element_type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<img decoding=\"async\" width=\"862\" height=\"550\" src=\"https:\/\/www.cubeserv.com\/wp-content\/uploads\/2022\/02\/Rplot_Bar_Graphs.jpeg\" class=\"attachment-large size-large wp-image-33241\" alt=\"simple bar chart\" srcset=\"https:\/\/www.cubeserv.com\/wp-content\/uploads\/2022\/02\/Rplot_Bar_Graphs.jpeg 862w, https:\/\/www.cubeserv.com\/wp-content\/uploads\/2022\/02\/Rplot_Bar_Graphs-300x191.jpeg 300w, https:\/\/www.cubeserv.com\/wp-content\/uploads\/2022\/02\/Rplot_Bar_Graphs-768x490.jpeg 768w\" sizes=\"(max-width: 862px) 100vw, 862px\" \/>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-7641211 elementor-widget elementor-widget-spacer\" data-id=\"7641211\" data-element_type=\"widget\" data-widget_type=\"spacer.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div class=\"elementor-spacer\">\n\t\t\t<div class=\"elementor-spacer-inner\"><\/div>\n\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-e2223f7 elementor-widget elementor-widget-text-editor\" data-id=\"e2223f7\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<h3>2.\u00a0\u00a0\u00a0\u00a0\u00a0 Histograms<\/h3><p>Histograms are very similar to bar plots. They are used to graphically view the continuous data and group them into bins. Each bar in a histogram has multiple bins with different colors which makes it easy to see the frequency of each individual category. Here\u2019s how we can make them using <em>ggplot2<\/em>.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-aff333e elementor-widget elementor-widget-code-highlight\" data-id=\"aff333e\" data-element_type=\"widget\" data-widget_type=\"code-highlight.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div class=\"prismjs-default copy-to-clipboard \">\n\t\t\t<pre data-line=\"\" class=\"highlight-height language-javascript \">\n\t\t\t\t<code readonly=\"true\" class=\"language-javascript\">\n\t\t\t\t\t<xmp>ggplot(data=iris, aes(x=Sepal.Width)) + \r\n  geom_histogram(binwidth=0.2, color=\"black\", aes(fill=Species)) + \r\n  xlab(\"Sepal Width\") + \r\n  ylab(\"Frequency\") + \r\n  ggtitle(\"Histogram of Sepal Width\")<\/xmp>\n\t\t\t\t<\/code>\n\t\t\t<\/pre>\n\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-d94d3a8 elementor-widget elementor-widget-image\" data-id=\"d94d3a8\" data-element_type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<img decoding=\"async\" src=\"https:\/\/www.cubeserv.com\/wp-content\/uploads\/elementor\/thumbs\/Rplot_Histogram-qeyihcsgodltmsowgtal57czt6hfvsjvotyepiu4n0.jpeg\" title=\"Rplot_Histogram\" alt=\"example Histogram\" loading=\"lazy\" \/>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-99bd835 elementor-widget elementor-widget-spacer\" data-id=\"99bd835\" data-element_type=\"widget\" data-widget_type=\"spacer.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div class=\"elementor-spacer\">\n\t\t\t<div class=\"elementor-spacer-inner\"><\/div>\n\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-32bd43e elementor-widget elementor-widget-text-editor\" data-id=\"32bd43e\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<h3>3.\u00a0\u00a0\u00a0\u00a0\u00a0 Box Plots<\/h3><p>A box plot visualizes the overall data distribution in a very compact manner. With a single box, you can view both the upper and lower quartiles and any outliers present, along with the range of data spread.<\/p><p>Interested in how to read a box plot? Click\u00a0<a href=\"https:\/\/www.statisticshowto.com\/probability-and-statistics\/descriptive-statistics\/box-plot\/#:~:text=Back%20to%20Top-,How%20to%20Read%20a%20Box%20Plot,(the%2075%25%20mark).\" target=\"_blank\" rel=\"noopener\">here<\/a>.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-ff2a9ad elementor-widget elementor-widget-code-highlight\" data-id=\"ff2a9ad\" data-element_type=\"widget\" data-widget_type=\"code-highlight.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div class=\"prismjs-default copy-to-clipboard \">\n\t\t\t<pre data-line=\"\" class=\"highlight-height language-r \">\n\t\t\t\t<code readonly=\"true\" class=\"language-r\">\n\t\t\t\t\t<xmp>ggplot(data=iris, aes(x=Species, y=Sepal.Length)) +\r\n  geom_boxplot(aes(fill=Species)) + \r\n  ylab(\"Sepal Length\") + ggtitle(\"Iris Boxplot\")<\/xmp>\n\t\t\t\t<\/code>\n\t\t\t<\/pre>\n\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-704730a elementor-widget elementor-widget-image\" data-id=\"704730a\" data-element_type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<img decoding=\"async\" src=\"https:\/\/www.cubeserv.com\/wp-content\/uploads\/elementor\/thumbs\/Rplot_Boxplot-qeyiheo521oea0m65u3ua6vwzy86b6rcd39do2rcak.jpeg\" title=\"Rplot_Boxplot\" alt=\"example Box Plots\" loading=\"lazy\" \/>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-cdff762 elementor-widget elementor-widget-spacer\" data-id=\"cdff762\" data-element_type=\"widget\" data-widget_type=\"spacer.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div class=\"elementor-spacer\">\n\t\t\t<div class=\"elementor-spacer-inner\"><\/div>\n\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-8ba700e elementor-widget elementor-widget-text-editor\" data-id=\"8ba700e\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<h3>4.\u00a0\u00a0\u00a0\u00a0\u00a0 Scatter Plots<\/h3><p>Last but not least, scatter plots are also very common and a useful way of viewing data. They\u2019re widely used by data scientists to view any present correlation between a set of variables. They simply scatter all the points of a variable on a chart and if there\u2019s any correlation between them, it becomes evident.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-cfb2e49 elementor-widget elementor-widget-code-highlight\" data-id=\"cfb2e49\" data-element_type=\"widget\" data-widget_type=\"code-highlight.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div class=\"prismjs-default copy-to-clipboard \">\n\t\t\t<pre data-line=\"\" class=\"highlight-height language-r \">\n\t\t\t\t<code readonly=\"true\" class=\"language-r\">\n\t\t\t\t\t<xmp>ggplot(data=iris, aes(x = Sepal.Length, y = Sepal.Width)) + geom_point(aes(color=Species, shape=Species)) +\r\n  xlab(\"Sepal Length\") +  ylab(\"Sepal Width\") +\r\n  ggtitle(\"Sepal Length-Width\")<\/xmp>\n\t\t\t\t<\/code>\n\t\t\t<\/pre>\n\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-f665d29 elementor-widget elementor-widget-image\" data-id=\"f665d29\" data-element_type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<img decoding=\"async\" src=\"https:\/\/www.cubeserv.com\/wp-content\/uploads\/elementor\/thumbs\/Rplot_Scatter_Plots-qeyihkb671w47odz8wjlp5gok9gdlddqdv6ajqiz98.jpeg\" title=\"Rplot_Scatter_Plots\" alt=\"Example Scatter Plots\" loading=\"lazy\" \/>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-11c7237 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"11c7237\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-c72985a\" data-id=\"c72985a\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-e624fe6 elementor-widget elementor-widget-spacer\" data-id=\"e624fe6\" data-element_type=\"widget\" data-widget_type=\"spacer.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div class=\"elementor-spacer\">\n\t\t\t<div class=\"elementor-spacer-inner\"><\/div>\n\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-274f927 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"274f927\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-66 elementor-top-column elementor-element elementor-element-626bca4\" data-id=\"626bca4\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-6cfd648 elementor-widget elementor-widget-text-editor\" data-id=\"6cfd648\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<h2>Regression Analysis In R<\/h2><p>Regression analysis refers to statistical processing where the relationship between the variables in a dataset are identified. We are mostly making out the relationship between the independent and dependent variables, but it doesn&#8217;t always have to be the case. This is another important function to do Advanced Analytics with R.<\/p><p>The idea of regression analysis is to help us to know how the other variable will change if we change one variable. This is precisely how regression models are built. There are different types of regression techniques we can use based on the shape of the regression line and the types of variables involved:<\/p><ul><li>Linear Regression<\/li><li>Logistic Regression<\/li><li>Multinomial Logistic Regression<\/li><li>Ordinal Logistic Regression<\/li><\/ul><p>Let\u2019s have a closer look at what the different regression types are used for.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t<div class=\"elementor-column elementor-col-33 elementor-top-column elementor-element elementor-element-37b8c4e\" data-id=\"37b8c4e\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-0af08ca elementor-widget elementor-widget-image\" data-id=\"0af08ca\" data-element_type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<img decoding=\"async\" width=\"1024\" height=\"762\" src=\"https:\/\/www.cubeserv.com\/wp-content\/uploads\/2022\/02\/Fotolia_65676998_M-1024x762.jpg\" class=\"attachment-large size-large wp-image-33462\" alt=\"Analytics\" srcset=\"https:\/\/www.cubeserv.com\/wp-content\/uploads\/2022\/02\/Fotolia_65676998_M-1024x762.jpg 1024w, https:\/\/www.cubeserv.com\/wp-content\/uploads\/2022\/02\/Fotolia_65676998_M-300x223.jpg 300w, https:\/\/www.cubeserv.com\/wp-content\/uploads\/2022\/02\/Fotolia_65676998_M-768x571.jpg 768w, https:\/\/www.cubeserv.com\/wp-content\/uploads\/2022\/02\/Fotolia_65676998_M-1536x1143.jpg 1536w, https:\/\/www.cubeserv.com\/wp-content\/uploads\/2022\/02\/Fotolia_65676998_M.jpg 1598w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-5c55337 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"5c55337\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-7e15239\" data-id=\"7e15239\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-9ccfbf7 elementor-widget elementor-widget-text-editor\" data-id=\"9ccfbf7\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<h3>1.\u00a0\u00a0\u00a0\u00a0\u00a0 Linear Regression<\/h3><p>This is the most basic type of regression and can be used where two variables have a linear relationship. Based on the values of the two variables, a straight line is modeled with the following equation:<\/p><p><em>Y = ax + b<\/em><\/p><p>Linear regression is used to predict continuous values where you just supply the value of the independent variable. You get the value of the dependent variable (y in this case) as a result.<\/p><h3>2.\u00a0\u00a0\u00a0\u00a0\u00a0 Logistic Regression<\/h3><p>Logistic regression is the following regression technique used to predict values within a specific range. It can be used when the target variable is categorical, for example, predicting the winner or loser using some data. The following equation is used in logistic regression.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-305550f elementor-widget elementor-widget-image\" data-id=\"305550f\" data-element_type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<img loading=\"lazy\" decoding=\"async\" width=\"155\" height=\"81\" src=\"https:\/\/www.cubeserv.com\/wp-content\/uploads\/2022\/02\/Logistic-Regression.png\" class=\"attachment-medium size-medium wp-image-33286\" alt=\"\" \/>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-ecf3000 elementor-widget elementor-widget-text-editor\" data-id=\"ecf3000\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<h3>3.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Multinomial Logistic Regression<\/h3>\n<p>As the name suggests, multinomial logistic regression is an advanced version of logistic regression. The difference between this and simple logistic regression is that it can support more than two categorical variables. Other than that, it uses the same mechanism as logistic regression.<\/p>\n<h3>4.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Ordinal Logistic Regression<\/h3>\n<p>This as well is an advanced mechanism to the simple logistic regression, and it&#8217;s used to predict the values that exist on different category levels, for example, predicting the ranks. An example application of using ordinal logistic regression would be rating your experience at a restaurant.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-4552d75 elementor-widget elementor-widget-spacer\" data-id=\"4552d75\" data-element_type=\"widget\" data-widget_type=\"spacer.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div class=\"elementor-spacer\">\n\t\t\t<div class=\"elementor-spacer-inner\"><\/div>\n\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-8ebbd8a elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"8ebbd8a\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-7735a77\" data-id=\"7735a77\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-4560e3c elementor-widget elementor-widget-text-editor\" data-id=\"4560e3c\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<h2>Using Regression in R<\/h2><p>Now, let&#8217;s see how we can do regression analysis in R. For demonstration, I would be creating a logistic regression model in R since it covers the concepts nicely.<\/p><p>Use Case: We will be predicting students\u2019 success in an exam using their IQ levels.<\/p><p>Let\u2019s generate some random IQ numbers to come up with our dataset.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-3518610 elementor-widget elementor-widget-code-highlight\" data-id=\"3518610\" data-element_type=\"widget\" data-widget_type=\"code-highlight.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div class=\"prismjs-default copy-to-clipboard \">\n\t\t\t<pre data-line=\"\" class=\"highlight-height language-r \">\n\t\t\t\t<code readonly=\"true\" class=\"language-r\">\n\t\t\t\t\t<xmp># Generate random IQ values with mean = 30 and sd =2\r\nIQ <- rnorm(40, 30, 2)\r\n \r\n# Sorting IQ level in ascending order\r\nIQ <- sort(IQ)<\/xmp>\n\t\t\t\t<\/code>\n\t\t\t<\/pre>\n\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-10e0806 elementor-widget elementor-widget-text-editor\" data-id=\"10e0806\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>Using the <em>rnorm()<\/em>, we have created a list of 40 IQ values that have a mean of 30 and a STD of 2.<\/p><p>Now, we randomly created pass\/fail values as 0\/1 for 40 students and put them in a dataframe. Also, we will associate each value we create with an IQ so our dataframe is complete.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-7e0a738 elementor-widget elementor-widget-code-highlight\" data-id=\"7e0a738\" data-element_type=\"widget\" data-widget_type=\"code-highlight.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div class=\"prismjs-default copy-to-clipboard \">\n\t\t\t<pre data-line=\"\" class=\"highlight-height language-r \">\n\t\t\t\t<code readonly=\"true\" class=\"language-r\">\n\t\t\t\t\t<xmp># Generate vector with pass and fail values of 40 students\r\nresult <- c(0, 0, 0, 1, 0, 0, 0, 0, 0, 1,\r\n1, 0, 0, 0, 1, 1, 0, 0, 1, 0,\r\n0, 0, 1, 0, 0, 1, 1, 0, 1, 1,\r\n1, 1, 1, 0, 1, 1, 1, 1, 0, 1)\r\n \r\n# Data Frame\r\ndf <- as.data.frame(cbind(IQ, result))\r\n \r\n# Print data frame\r\nprint(df)<\/xmp>\n\t\t\t\t<\/code>\n\t\t\t<\/pre>\n\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-4339800 elementor-widget elementor-widget-image\" data-id=\"4339800\" data-element_type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<img loading=\"lazy\" decoding=\"async\" width=\"300\" height=\"254\" src=\"https:\/\/www.cubeserv.com\/wp-content\/uploads\/2022\/02\/blog_iq_pass_table.png\" class=\"attachment-medium_large size-medium_large wp-image-33292\" alt=\"example table\" \/>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-a6a4353 elementor-widget elementor-widget-text-editor\" data-id=\"a6a4353\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>Now, let\u2019s create a regression model based on our dataset and create a curve to see how the regression model performs on it. We can use the <em>glm()<\/em> function to create and train a regression model and the <em>curve() <\/em>method to plot the curve based on prediction.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-774227f elementor-widget elementor-widget-code-highlight\" data-id=\"774227f\" data-element_type=\"widget\" data-widget_type=\"code-highlight.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div class=\"prismjs-default copy-to-clipboard \">\n\t\t\t<pre data-line=\"\" class=\"highlight-height language-r \">\n\t\t\t\t<code readonly=\"true\" class=\"language-r\">\n\t\t\t\t\t<xmp># Plotting IQ on x-axis and result on y-axis\r\nplot(IQ, result, xlab = \"IQ Level\",\r\nylab = \"Probability of Passing\")\r\n \r\n# Create a logistic model\r\ng = glm(result~IQ, family=binomial, df)\r\n \r\n# Create a curve based on prediction using the regression model\r\ncurve(predict(g, data.frame(IQ=x), type=\"resp\"), add=TRUE)\r\n \r\n# This Draws a set of points\r\n# Based on fit to the regression model\r\npoints(IQ, fitted(g), pch=30)<\/xmp>\n\t\t\t\t<\/code>\n\t\t\t<\/pre>\n\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-5a3aa23 elementor-widget elementor-widget-image\" data-id=\"5a3aa23\" data-element_type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t\t\t\t<figure class=\"wp-caption\">\n\t\t\t\t\t\t\t\t\t\t<img loading=\"lazy\" decoding=\"async\" width=\"862\" height=\"550\" src=\"https:\/\/www.cubeserv.com\/wp-content\/uploads\/2022\/02\/Rplot_curve.jpeg\" class=\"attachment-large size-large wp-image-33299\" alt=\"regression model as graph\" srcset=\"https:\/\/www.cubeserv.com\/wp-content\/uploads\/2022\/02\/Rplot_curve.jpeg 862w, https:\/\/www.cubeserv.com\/wp-content\/uploads\/2022\/02\/Rplot_curve-300x191.jpeg 300w, https:\/\/www.cubeserv.com\/wp-content\/uploads\/2022\/02\/Rplot_curve-768x490.jpeg 768w\" sizes=\"(max-width: 862px) 100vw, 862px\" \/>\t\t\t\t\t\t\t\t\t\t\t<figcaption class=\"widget-image-caption wp-caption-text\">regression model as graph<\/figcaption>\n\t\t\t\t\t\t\t\t\t\t<\/figure>\n\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-e02ca0c elementor-widget elementor-widget-text-editor\" data-id=\"e02ca0c\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>Moreover, if you want to check the logistic regression model&#8217;s statistics further, you can do so by running the <em>summary() <\/em>of R (<em>summary(g)<\/em>).\u00a0<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-f206022 elementor-widget elementor-widget-spacer\" data-id=\"f206022\" data-element_type=\"widget\" data-widget_type=\"spacer.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div class=\"elementor-spacer\">\n\t\t\t<div class=\"elementor-spacer-inner\"><\/div>\n\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-0ed04f8 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"0ed04f8\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-1cb002e\" data-id=\"1cb002e\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-7aee867 elementor-widget elementor-widget-text-editor\" data-id=\"7aee867\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<h2>Time Series Forecast In R<\/h2><p>Time Series Forecast is amongst the strongest suits of R. While Python is also quite famous for time series analysis, many experts still argue that R provides you with an overall better experience. The <em>Forecast<\/em> package is very comprehensive, and the best one could wish for Advanced Analytics with R.<\/p><p>In this article, we will be covering the following methods of Time Series Forecasting:<\/p><ul><li>Na\u00efve Methods<\/li><li>Exponential Smoothing<\/li><li>BATS and TBATS<\/li><\/ul><p>We&#8217;ll use the Air Passengers dataset present in R to create models on a validation set, forecast as far as the duration for the validation set goes, and finally obtain the <a href=\"https:\/\/www.statisticshowto.com\/mean-absolute-percentage-error-mape\/\">Mean Absolute Percentage Error<\/a> to complete the segment.<\/p><p>So, let\u2019s initialize the data along with the training and validation window to get started.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-8f197c1 elementor-widget elementor-widget-code-highlight\" data-id=\"8f197c1\" data-element_type=\"widget\" data-widget_type=\"code-highlight.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div class=\"prismjs-default copy-to-clipboard \">\n\t\t\t<pre data-line=\"\" class=\"highlight-height language-r \">\n\t\t\t\t<code readonly=\"true\" class=\"language-r\">\n\t\t\t\t\t<xmp>#  Time Series Forecast In R\r\ninstall.packages(\"forecast\")\r\ninstall.packages(\"MLmetrics\")\r\nlibrary(forecast)\r\nlibrary(MLmetrics)\r\ndata=AirPassengers\r\n#Create samples\r\ntraining=window(data, start = c(1949,1), end = c(1955,12))\r\nvalidation=window(data, start = c(1956,1))<\/xmp>\n\t\t\t\t<\/code>\n\t\t\t<\/pre>\n\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-0dbe12a elementor-widget elementor-widget-text-editor\" data-id=\"0dbe12a\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<h3><strong>1.\u00a0\u00a0\u00a0 <\/strong><strong>Na\u00efve Methods<\/strong><\/h3><p>As the name suggests, the na\u00efve method is the simplest of all forecasting methods. It is based on the simple principle of &#8220;what we observe today, will be the forecast tomorrow.&#8221; Seasonal na\u00efve method is a bit complex variant where the observation period is according to the horizon we&#8217;re working with, e.g., week\/month\/year.<\/p><p>Let\u2019s move forward with a seasonal na\u00efve forecast.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-381115d elementor-widget elementor-widget-code-highlight\" data-id=\"381115d\" data-element_type=\"widget\" data-widget_type=\"code-highlight.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div class=\"prismjs-default copy-to-clipboard \">\n\t\t\t<pre data-line=\"\" class=\"highlight-height language-r \">\n\t\t\t\t<code readonly=\"true\" class=\"language-r\">\n\t\t\t\t\t<xmp>naive = snaive(training, h=length(validation))\r\nMAPE(naive$mean, validation) * 100<\/xmp>\n\t\t\t\t<\/code>\n\t\t\t<\/pre>\n\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-60ead3d elementor-widget elementor-widget-text-editor\" data-id=\"60ead3d\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>Here, we can see an MAPE score of 27.05%. Let\u2019s go ahead and plot this result.<\/p><p>MAPE score = <a href=\"https:\/\/www.statisticshowto.com\/mean-absolute-percentage-error-mape\/\">Mean Absolute Percentage Error<\/a><\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-439900e elementor-widget elementor-widget-code-highlight\" data-id=\"439900e\" data-element_type=\"widget\" data-widget_type=\"code-highlight.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div class=\"prismjs-default copy-to-clipboard \">\n\t\t\t<pre data-line=\"\" class=\"highlight-height language-r \">\n\t\t\t\t<code readonly=\"true\" class=\"language-r\">\n\t\t\t\t\t<xmp>plot(data, col=\"blue\", xlab=\"Year\", ylab=\"Passengers\", main=\"Seasonal Naive Forecast\", type='l')\r\nlines(naive$mean, col=\"red\", lwd=2)<\/xmp>\n\t\t\t\t<\/code>\n\t\t\t<\/pre>\n\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-0f981b9 elementor-widget elementor-widget-image\" data-id=\"0f981b9\" data-element_type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<img loading=\"lazy\" decoding=\"async\" width=\"768\" height=\"490\" src=\"https:\/\/www.cubeserv.com\/wp-content\/uploads\/2022\/02\/Rplot_Seasonal_Naive_Forecast-768x490.jpeg\" class=\"attachment-medium_large size-medium_large wp-image-33314\" alt=\"plot forecast result naive forecast\" srcset=\"https:\/\/www.cubeserv.com\/wp-content\/uploads\/2022\/02\/Rplot_Seasonal_Naive_Forecast-768x490.jpeg 768w, https:\/\/www.cubeserv.com\/wp-content\/uploads\/2022\/02\/Rplot_Seasonal_Naive_Forecast-300x191.jpeg 300w, https:\/\/www.cubeserv.com\/wp-content\/uploads\/2022\/02\/Rplot_Seasonal_Naive_Forecast.jpeg 862w\" sizes=\"(max-width: 768px) 100vw, 768px\" \/>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-3c94826 elementor-widget elementor-widget-text-editor\" data-id=\"3c94826\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>As you can see, last year&#8217;s dataset is simply repeated for the validation period. That&#8217;s a seasonal na\u00efve forecast in a nutshell for you.<\/p><h3><strong>2.\u00a0\u00a0\u00a0 <\/strong><strong>Exponential Smoothing<\/strong><\/h3><p>Exponential smoothing, in its essence, refers to giving reduced weight to observations. Like moving averages, the most recent observations get a higher weight, while the older ones gradually reduce in their weights, hence the importance.<\/p><p>The good thing about forecast package is that we can find the optimal exponential smoothing models through placing the smoothing methods inside the structure of space models.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-0171494 elementor-widget elementor-widget-code-highlight\" data-id=\"0171494\" data-element_type=\"widget\" data-widget_type=\"code-highlight.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div class=\"prismjs-default copy-to-clipboard \">\n\t\t\t<pre data-line=\"\" class=\"highlight-height language-r \">\n\t\t\t\t<code readonly=\"true\" class=\"language-r\">\n\t\t\t\t\t<xmp>ets_model = ets(training, allow.multiplicative.trend = TRUE)\r\nsummary(ets_model)<\/xmp>\n\t\t\t\t<\/code>\n\t\t\t<\/pre>\n\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-20d48d6 elementor-widget elementor-widget-image\" data-id=\"20d48d6\" data-element_type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t\t\t\t<figure class=\"wp-caption\">\n\t\t\t\t\t\t\t\t\t\t<img loading=\"lazy\" decoding=\"async\" width=\"443\" height=\"338\" src=\"https:\/\/www.cubeserv.com\/wp-content\/uploads\/2022\/02\/summary-ets-model.png\" class=\"attachment-medium_large size-medium_large wp-image-33317\" alt=\"summary ets model\" srcset=\"https:\/\/www.cubeserv.com\/wp-content\/uploads\/2022\/02\/summary-ets-model.png 443w, https:\/\/www.cubeserv.com\/wp-content\/uploads\/2022\/02\/summary-ets-model-300x229.png 300w\" sizes=\"(max-width: 443px) 100vw, 443px\" \/>\t\t\t\t\t\t\t\t\t\t\t<figcaption class=\"widget-image-caption wp-caption-text\">summary ets model<\/figcaption>\n\t\t\t\t\t\t\t\t\t\t<\/figure>\n\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-02ed5fb elementor-widget elementor-widget-text-editor\" data-id=\"02ed5fb\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>Now, we will plug in the estimated optimal smoothing model to our ETS forecast and see how it performs.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-f73c2d6 elementor-widget elementor-widget-code-highlight\" data-id=\"f73c2d6\" data-element_type=\"widget\" data-widget_type=\"code-highlight.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div class=\"prismjs-default copy-to-clipboard \">\n\t\t\t<pre data-line=\"\" class=\"highlight-height language-r \">\n\t\t\t\t<code readonly=\"true\" class=\"language-r\">\n\t\t\t\t\t<xmp>ets_forecast = forecast(ets_model, h=length(validation))\r\nMAPE(ets_forecast$mean, validation) *100<\/xmp>\n\t\t\t\t<\/code>\n\t\t\t<\/pre>\n\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-6a7da38 elementor-widget elementor-widget-text-editor\" data-id=\"6a7da38\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>As a result, we get a MAPE of 12.6%. Also, it&#8217;s evident that the upward trend is being counted for a little bit.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-ebe5d07 elementor-widget elementor-widget-image\" data-id=\"ebe5d07\" data-element_type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<img loading=\"lazy\" decoding=\"async\" width=\"768\" height=\"490\" src=\"https:\/\/www.cubeserv.com\/wp-content\/uploads\/2022\/02\/Rplot_ETS_Forecast-768x490.jpeg\" class=\"attachment-medium_large size-medium_large wp-image-33326\" alt=\"graph ETS optimized model\" srcset=\"https:\/\/www.cubeserv.com\/wp-content\/uploads\/2022\/02\/Rplot_ETS_Forecast-768x490.jpeg 768w, https:\/\/www.cubeserv.com\/wp-content\/uploads\/2022\/02\/Rplot_ETS_Forecast-300x191.jpeg 300w, https:\/\/www.cubeserv.com\/wp-content\/uploads\/2022\/02\/Rplot_ETS_Forecast.jpeg 862w\" sizes=\"(max-width: 768px) 100vw, 768px\" \/>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-c283caf elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"c283caf\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-97d37ee\" data-id=\"97d37ee\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-798fb45 elementor-widget elementor-widget-spacer\" data-id=\"798fb45\" data-element_type=\"widget\" data-widget_type=\"spacer.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div class=\"elementor-spacer\">\n\t\t\t<div class=\"elementor-spacer-inner\"><\/div>\n\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-8db6e40 elementor-widget elementor-widget-text-editor\" data-id=\"8db6e40\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<h3><strong>3.\u00a0\u00a0\u00a0 <\/strong><strong>BATS and TBATS<\/strong><\/h3><p>For the processes that have very complex trends, ETS is often not good enough. Sometimes, you can have both weekly and yearly seasonality, and this is where BATS and TBATS stands out, as it can handle multiple seasonalities at once.<\/p><p>Let\u2019s build a TBATS model and do the forecasting.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-6ce40b1 elementor-widget elementor-widget-code-highlight\" data-id=\"6ce40b1\" data-element_type=\"widget\" data-widget_type=\"code-highlight.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div class=\"prismjs-default copy-to-clipboard \">\n\t\t\t<pre data-line=\"\" class=\"highlight-height language-r \">\n\t\t\t\t<code readonly=\"true\" class=\"language-r\">\n\t\t\t\t\t<xmp>tbats_model = tbats(training)\r\ntbats_forecast = forecast(tbats_model, h=length(validation))\r\nMAPE(tbats_forecast$mean, validation) * 100\r\n\r\nplot(data, col=\"blue\", xlab=\"Year\", ylab=\"Passengers\", main=\"ETS Forecast\", type='l')\r\nlines(tbats_forecast$mean, col=\"red\", lwd=2)<\/xmp>\n\t\t\t\t<\/code>\n\t\t\t<\/pre>\n\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-543e787 elementor-widget elementor-widget-image\" data-id=\"543e787\" data-element_type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<img loading=\"lazy\" decoding=\"async\" width=\"768\" height=\"490\" src=\"https:\/\/www.cubeserv.com\/wp-content\/uploads\/2022\/02\/Rplot_tbats_forecast-768x490.jpeg\" class=\"attachment-medium_large size-medium_large wp-image-33335\" alt=\"graph TBATS Forecast\" srcset=\"https:\/\/www.cubeserv.com\/wp-content\/uploads\/2022\/02\/Rplot_tbats_forecast-768x490.jpeg 768w, https:\/\/www.cubeserv.com\/wp-content\/uploads\/2022\/02\/Rplot_tbats_forecast-300x191.jpeg 300w, https:\/\/www.cubeserv.com\/wp-content\/uploads\/2022\/02\/Rplot_tbats_forecast.jpeg 862w\" sizes=\"(max-width: 768px) 100vw, 768px\" \/>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-0269892 elementor-widget elementor-widget-text-editor\" data-id=\"0269892\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>As you can see, a MAPE of 12.9% is achieved using this method.<\/p><p>\u00a0<\/p><h2>Wrap Up<\/h2><p>That&#8217;s all for today! We learned about advanced analytics in R\u00a0 focusing on plotting and different kinds of regression analytics and we further covered Time Series Forecast in R. However, Time Series is a pretty comprehensive topic in itself and we have only scratched the surface yet. So stay tuned, because we will cover Time Series in detail in the upcoming blogs.<\/p><p>Until then, happy R-ing guys!<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"<p>In this blog we show how easy it is to use Advanced Analytics functions in R. We focus on different graph types, Regression Analysis with R and Time Series Forecast with R.<\/p>\n","protected":false},"author":13,"featured_media":33335,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"content-type":"","footnotes":""},"categories":[508,544],"tags":[45,555],"class_list":["post-33228","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-business-analytics","category-business-analytics-plattform","tag-business-analytics-platform","tag-r"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v21.7 (Yoast SEO v23.9) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Advanced Analytics with R: An Overview - CubeServ<\/title>\n<meta name=\"description\" content=\"In this blog we show how easy it is to use Advanced Analytics functions in R like Regression Analysis with R and Time Series Forecast with R.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.cubeserv.com\/en\/advanced-analytics-with-r\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Advanced Analytics with R: An Overview\" \/>\n<meta property=\"og:description\" content=\"In this blog we show how easy it is to use Advanced Analytics functions in R like Regression Analysis with R and Time Series Forecast with R.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.cubeserv.com\/en\/advanced-analytics-with-r\/\" \/>\n<meta property=\"og:site_name\" content=\"CubeServ\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/CubeServ\" \/>\n<meta property=\"article:published_time\" content=\"2022-02-08T15:44:02+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-02-09T14:49:38+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.cubeserv.com\/wp-content\/uploads\/2022\/02\/Rplot_tbats_forecast.jpeg\" \/>\n\t<meta property=\"og:image:width\" content=\"862\" \/>\n\t<meta property=\"og:image:height\" content=\"550\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Adrian Bourcevet\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@CubeServ\" \/>\n<meta name=\"twitter:site\" content=\"@CubeServ\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Adrian Bourcevet\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"12 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.cubeserv.com\/en\/advanced-analytics-with-r\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.cubeserv.com\/en\/advanced-analytics-with-r\/\"},\"author\":{\"name\":\"Adrian Bourcevet\",\"@id\":\"https:\/\/www.cubeserv.com\/en\/#\/schema\/person\/574e60369373adc3dfa856f4ba151e3d\"},\"headline\":\"Advanced Analytics with R: An Overview\",\"datePublished\":\"2022-02-08T15:44:02+00:00\",\"dateModified\":\"2022-02-09T14:49:38+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.cubeserv.com\/en\/advanced-analytics-with-r\/\"},\"wordCount\":1548,\"publisher\":{\"@id\":\"https:\/\/www.cubeserv.com\/en\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.cubeserv.com\/en\/advanced-analytics-with-r\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.cubeserv.com\/wp-content\/uploads\/2022\/02\/Rplot_tbats_forecast.jpeg\",\"keywords\":[\"Business Analytics Platform\",\"R\"],\"articleSection\":[\"Business Analytics\",\"Business Analytics Plattform\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.cubeserv.com\/en\/advanced-analytics-with-r\/\",\"url\":\"https:\/\/www.cubeserv.com\/en\/advanced-analytics-with-r\/\",\"name\":\"Advanced Analytics with R: An Overview - CubeServ\",\"isPartOf\":{\"@id\":\"https:\/\/www.cubeserv.com\/en\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.cubeserv.com\/en\/advanced-analytics-with-r\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.cubeserv.com\/en\/advanced-analytics-with-r\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.cubeserv.com\/wp-content\/uploads\/2022\/02\/Rplot_tbats_forecast.jpeg\",\"datePublished\":\"2022-02-08T15:44:02+00:00\",\"dateModified\":\"2022-02-09T14:49:38+00:00\",\"description\":\"In this blog we show how easy it is to use Advanced Analytics functions in R like Regression Analysis with R and Time Series Forecast with R.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.cubeserv.com\/en\/advanced-analytics-with-r\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.cubeserv.com\/en\/advanced-analytics-with-r\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.cubeserv.com\/en\/advanced-analytics-with-r\/#primaryimage\",\"url\":\"https:\/\/www.cubeserv.com\/wp-content\/uploads\/2022\/02\/Rplot_tbats_forecast.jpeg\",\"contentUrl\":\"https:\/\/www.cubeserv.com\/wp-content\/uploads\/2022\/02\/Rplot_tbats_forecast.jpeg\",\"width\":862,\"height\":550,\"caption\":\"TBATS Forecast\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.cubeserv.com\/en\/advanced-analytics-with-r\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Startseite\",\"item\":\"https:\/\/www.cubeserv.com\/en\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Advanced Analytics with R: An Overview\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.cubeserv.com\/en\/#website\",\"url\":\"https:\/\/www.cubeserv.com\/en\/\",\"name\":\"CubeServ\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/www.cubeserv.com\/en\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.cubeserv.com\/en\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.cubeserv.com\/en\/#organization\",\"name\":\"CubeServ Group\",\"url\":\"https:\/\/www.cubeserv.com\/en\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.cubeserv.com\/en\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.cubeserv.com\/wp-content\/uploads\/2020\/07\/CubeServ_Web_Logo-768x372-1.png\",\"contentUrl\":\"https:\/\/www.cubeserv.com\/wp-content\/uploads\/2020\/07\/CubeServ_Web_Logo-768x372-1.png\",\"width\":768,\"height\":372,\"caption\":\"CubeServ Group\"},\"image\":{\"@id\":\"https:\/\/www.cubeserv.com\/en\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/CubeServ\",\"https:\/\/x.com\/CubeServ\",\"https:\/\/www.instagram.com\/cubeservgroup\/\",\"https:\/\/www.linkedin.com\/company\/112961\/\",\"https:\/\/www.youtube.com\/user\/CubeServGroup\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.cubeserv.com\/en\/#\/schema\/person\/574e60369373adc3dfa856f4ba151e3d\",\"name\":\"Adrian Bourcevet\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.cubeserv.com\/en\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/www.cubeserv.com\/wp-content\/plugins\/wp-user-avatar\/deprecated\/wp-user-avatar\/images\/wpua-96x96.png\",\"contentUrl\":\"https:\/\/www.cubeserv.com\/wp-content\/plugins\/wp-user-avatar\/deprecated\/wp-user-avatar\/images\/wpua-96x96.png\",\"caption\":\"Adrian Bourcevet\"},\"url\":\"https:\/\/www.cubeserv.com\/en\/author\/bourceveta\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Advanced Analytics with R: An Overview - CubeServ","description":"In this blog we show how easy it is to use Advanced Analytics functions in R like Regression Analysis with R and Time Series Forecast with R.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.cubeserv.com\/en\/advanced-analytics-with-r\/","og_locale":"en_US","og_type":"article","og_title":"Advanced Analytics with R: An Overview","og_description":"In this blog we show how easy it is to use Advanced Analytics functions in R like Regression Analysis with R and Time Series Forecast with R.","og_url":"https:\/\/www.cubeserv.com\/en\/advanced-analytics-with-r\/","og_site_name":"CubeServ","article_publisher":"https:\/\/www.facebook.com\/CubeServ","article_published_time":"2022-02-08T15:44:02+00:00","article_modified_time":"2022-02-09T14:49:38+00:00","og_image":[{"width":862,"height":550,"url":"https:\/\/www.cubeserv.com\/wp-content\/uploads\/2022\/02\/Rplot_tbats_forecast.jpeg","type":"image\/jpeg"}],"author":"Adrian Bourcevet","twitter_card":"summary_large_image","twitter_creator":"@CubeServ","twitter_site":"@CubeServ","twitter_misc":{"Written by":"Adrian Bourcevet","Est. reading time":"12 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.cubeserv.com\/en\/advanced-analytics-with-r\/#article","isPartOf":{"@id":"https:\/\/www.cubeserv.com\/en\/advanced-analytics-with-r\/"},"author":{"name":"Adrian Bourcevet","@id":"https:\/\/www.cubeserv.com\/en\/#\/schema\/person\/574e60369373adc3dfa856f4ba151e3d"},"headline":"Advanced Analytics with R: An Overview","datePublished":"2022-02-08T15:44:02+00:00","dateModified":"2022-02-09T14:49:38+00:00","mainEntityOfPage":{"@id":"https:\/\/www.cubeserv.com\/en\/advanced-analytics-with-r\/"},"wordCount":1548,"publisher":{"@id":"https:\/\/www.cubeserv.com\/en\/#organization"},"image":{"@id":"https:\/\/www.cubeserv.com\/en\/advanced-analytics-with-r\/#primaryimage"},"thumbnailUrl":"https:\/\/www.cubeserv.com\/wp-content\/uploads\/2022\/02\/Rplot_tbats_forecast.jpeg","keywords":["Business Analytics Platform","R"],"articleSection":["Business Analytics","Business Analytics Plattform"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.cubeserv.com\/en\/advanced-analytics-with-r\/","url":"https:\/\/www.cubeserv.com\/en\/advanced-analytics-with-r\/","name":"Advanced Analytics with R: An Overview - CubeServ","isPartOf":{"@id":"https:\/\/www.cubeserv.com\/en\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.cubeserv.com\/en\/advanced-analytics-with-r\/#primaryimage"},"image":{"@id":"https:\/\/www.cubeserv.com\/en\/advanced-analytics-with-r\/#primaryimage"},"thumbnailUrl":"https:\/\/www.cubeserv.com\/wp-content\/uploads\/2022\/02\/Rplot_tbats_forecast.jpeg","datePublished":"2022-02-08T15:44:02+00:00","dateModified":"2022-02-09T14:49:38+00:00","description":"In this blog we show how easy it is to use Advanced Analytics functions in R like Regression Analysis with R and Time Series Forecast with R.","breadcrumb":{"@id":"https:\/\/www.cubeserv.com\/en\/advanced-analytics-with-r\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.cubeserv.com\/en\/advanced-analytics-with-r\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.cubeserv.com\/en\/advanced-analytics-with-r\/#primaryimage","url":"https:\/\/www.cubeserv.com\/wp-content\/uploads\/2022\/02\/Rplot_tbats_forecast.jpeg","contentUrl":"https:\/\/www.cubeserv.com\/wp-content\/uploads\/2022\/02\/Rplot_tbats_forecast.jpeg","width":862,"height":550,"caption":"TBATS Forecast"},{"@type":"BreadcrumbList","@id":"https:\/\/www.cubeserv.com\/en\/advanced-analytics-with-r\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Startseite","item":"https:\/\/www.cubeserv.com\/en\/"},{"@type":"ListItem","position":2,"name":"Advanced Analytics with R: An Overview"}]},{"@type":"WebSite","@id":"https:\/\/www.cubeserv.com\/en\/#website","url":"https:\/\/www.cubeserv.com\/en\/","name":"CubeServ","description":"","publisher":{"@id":"https:\/\/www.cubeserv.com\/en\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.cubeserv.com\/en\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.cubeserv.com\/en\/#organization","name":"CubeServ Group","url":"https:\/\/www.cubeserv.com\/en\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.cubeserv.com\/en\/#\/schema\/logo\/image\/","url":"https:\/\/www.cubeserv.com\/wp-content\/uploads\/2020\/07\/CubeServ_Web_Logo-768x372-1.png","contentUrl":"https:\/\/www.cubeserv.com\/wp-content\/uploads\/2020\/07\/CubeServ_Web_Logo-768x372-1.png","width":768,"height":372,"caption":"CubeServ Group"},"image":{"@id":"https:\/\/www.cubeserv.com\/en\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/CubeServ","https:\/\/x.com\/CubeServ","https:\/\/www.instagram.com\/cubeservgroup\/","https:\/\/www.linkedin.com\/company\/112961\/","https:\/\/www.youtube.com\/user\/CubeServGroup"]},{"@type":"Person","@id":"https:\/\/www.cubeserv.com\/en\/#\/schema\/person\/574e60369373adc3dfa856f4ba151e3d","name":"Adrian Bourcevet","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.cubeserv.com\/en\/#\/schema\/person\/image\/","url":"https:\/\/www.cubeserv.com\/wp-content\/plugins\/wp-user-avatar\/deprecated\/wp-user-avatar\/images\/wpua-96x96.png","contentUrl":"https:\/\/www.cubeserv.com\/wp-content\/plugins\/wp-user-avatar\/deprecated\/wp-user-avatar\/images\/wpua-96x96.png","caption":"Adrian Bourcevet"},"url":"https:\/\/www.cubeserv.com\/en\/author\/bourceveta\/"}]}},"_links":{"self":[{"href":"https:\/\/www.cubeserv.com\/en\/wp-json\/wp\/v2\/posts\/33228","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.cubeserv.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.cubeserv.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.cubeserv.com\/en\/wp-json\/wp\/v2\/users\/13"}],"replies":[{"embeddable":true,"href":"https:\/\/www.cubeserv.com\/en\/wp-json\/wp\/v2\/comments?post=33228"}],"version-history":[{"count":0,"href":"https:\/\/www.cubeserv.com\/en\/wp-json\/wp\/v2\/posts\/33228\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.cubeserv.com\/en\/wp-json\/wp\/v2\/media\/33335"}],"wp:attachment":[{"href":"https:\/\/www.cubeserv.com\/en\/wp-json\/wp\/v2\/media?parent=33228"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.cubeserv.com\/en\/wp-json\/wp\/v2\/categories?post=33228"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.cubeserv.com\/en\/wp-json\/wp\/v2\/tags?post=33228"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}