

{"id":3135,"date":"2017-07-06T09:08:07","date_gmt":"2017-07-06T09:08:07","guid":{"rendered":"http:\/\/data-flair.training\/blogs\/?p=3135"},"modified":"2021-08-25T18:20:47","modified_gmt":"2021-08-25T12:50:47","slug":"r-nonlinear-regression","status":"publish","type":"post","link":"https:\/\/data-flair.training\/blogs\/r-nonlinear-regression\/","title":{"rendered":"R Nonlinear Regression Analysis &#8211; All-inclusive Tutorial for Newbies!"},"content":{"rendered":"<div class='__iawmlf-post-loop-links' style='display:none;' data-iawmlf-post-links='[{&quot;id&quot;:2208,&quot;href&quot;:&quot;https:\\\/\\\/drive.google.com\\\/open?id=1RmDs1hWcgYGD0GxbXliLAOoDT50p-cL0&quot;,&quot;archived_href&quot;:&quot;&quot;,&quot;redirect_href&quot;:&quot;https:\\\/\\\/drive.google.com\\\/file\\\/d\\\/1RmDs1hWcgYGD0GxbXliLAOoDT50p-cL0\\\/view?usp=drive_open&quot;,&quot;checks&quot;:[],&quot;broken&quot;:false,&quot;last_checked&quot;:null,&quot;process&quot;:&quot;done&quot;},{&quot;id&quot;:1467,&quot;href&quot;:&quot;https:\\\/\\\/en.wikipedia.org\\\/wiki\\\/R_(programming_language)&quot;,&quot;archived_href&quot;:&quot;http:\\\/\\\/web-wp.archive.org\\\/web\\\/20251001042859\\\/https:\\\/\\\/en.wikipedia.org\\\/wiki\\\/R_(programming_language)&quot;,&quot;redirect_href&quot;:&quot;&quot;,&quot;checks&quot;:[{&quot;date&quot;:&quot;2025-12-09 08:17:04&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2025-12-12 12:22:33&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2025-12-15 12:29:21&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2025-12-18 15:20:53&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2025-12-21 18:00:25&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2025-12-25 04:08:57&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2025-12-28 06:54:42&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2025-12-31 09:47:17&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-01-03 17:14:22&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-01-06 19:17:34&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-01-09 21:09:32&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-01-13 04:31:41&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-01-16 15:06:53&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-01-19 19:03:58&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-01-23 05:30:29&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-01-26 10:18:28&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-01-29 11:45:43&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-02-01 12:00:34&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-02-04 12:09:55&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-02-07 15:09:43&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-02-10 18:01:34&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-02-13 23:45:59&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-02-17 05:29:44&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-02-20 07:23:59&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-02-23 10:05:24&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-02-26 14:54:33&quot;,&quot;http_code&quot;:404},{&quot;date&quot;:&quot;2026-03-01 16:00:29&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-04 19:56:49&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-08 03:19:57&quot;,&quot;http_code&quot;:429},{&quot;date&quot;:&quot;2026-03-11 07:47:37&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-14 13:54:22&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-17 17:24:09&quot;,&quot;http_code&quot;:429},{&quot;date&quot;:&quot;2026-03-20 23:04:55&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-24 00:07:34&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-27 00:15:51&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-30 08:20:38&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-04-03 14:48:26&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-04-06 19:55:35&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-04-10 05:52:27&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-04-13 07:47:26&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-04-16 08:05:10&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-04-19 13:04:23&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-04-22 13:52:44&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-04-25 13:58:03&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-04-29 01:16:25&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-05-02 04:13:02&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-05-05 06:33:38&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-05-08 17:48:43&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-05-12 03:38:06&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-05-15 04:53:06&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-05-18 09:15:30&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-05-21 12:35:48&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-05-25 03:51:04&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-05-28 07:13:15&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-06-01 04:45:49&quot;,&quot;http_code&quot;:404},{&quot;date&quot;:&quot;2026-06-04 06:40:14&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-06-07 06:45:43&quot;,&quot;http_code&quot;:404},{&quot;date&quot;:&quot;2026-06-10 09:02:48&quot;,&quot;http_code&quot;:404}],&quot;broken&quot;:false,&quot;last_checked&quot;:{&quot;date&quot;:&quot;2026-06-10 09:02:48&quot;,&quot;http_code&quot;:404},&quot;process&quot;:&quot;done&quot;}]'><\/div>\n<p>Previously, we learned about <em><strong><a href=\"https:\/\/data-flair.training\/blogs\/r-linear-regression-tutorial\/\">R linear regression<\/a><\/strong><\/em>, now, it&#8217;s the turn for nonlinear regression in R programming. We will study about logistic regression with its types and multivariate<em> logit()<\/em> function in detail. We will also explore the transformation of nonlinear model into linear model, generalized additive models, self-starting functions and lastly, applications of logistic regression.<\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2017\/07\/Nonlinear-regression-analysis-in-R.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-65497\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2017\/07\/Nonlinear-regression-analysis-in-R.png\" alt=\"Nonlinear-regression-analysis-in-R\" width=\"802\" height=\"420\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2017\/07\/Nonlinear-regression-analysis-in-R.png 802w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2017\/07\/Nonlinear-regression-analysis-in-R-150x79.png 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2017\/07\/Nonlinear-regression-analysis-in-R-300x157.png 300w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2017\/07\/Nonlinear-regression-analysis-in-R-768x402.png 768w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2017\/07\/Nonlinear-regression-analysis-in-R-520x272.png 520w\" sizes=\"auto, (max-width: 802px) 100vw, 802px\" \/><\/a><\/p>\n<h2>R Nonlinear Regression Analysis<\/h2>\n<p><strong>R Nonlinear Regression<\/strong> and <strong>Generalized Linear Models<\/strong>:<\/p>\n<p>Regression is nonlinear when at least one of its parameters appears nonlinearly. It commonly sorts and analyzes data of various industries like retail and banking sectors. It also helps to draw conclusions and predict future trends on the basis of the user\u2019s activities on the internet.<\/p>\n<p><em>The <strong>nonlinear regression analysis in R\u00a0<\/strong>is the process of building a nonlinear function. On the basis of independent variables, this process predicts the outcome of a dependent variable with the help of model parameters that depend on the degree of relationship among variables.<\/em><\/p>\n<p><em><strong>Generalized linear models (GLMs)<\/strong> calculates nonlinear regression when the variance in sample data is not constant or when errors are not normally distributed.<\/em><\/p>\n<p>A generalized linear model commonly applies to the following types of regressions when:<\/p>\n<ul>\n<li>Count data is expressed as proportions (e.g. logistic regressions).<\/li>\n<li>Count data is not expressed as proportions (e.g. log-linear models of counts).<\/li>\n<li>We have binary response variables (e.g. \u201cyes\/no\u201d, \u201cday\/night\u201d, \u201csleep\/awake\u201d, buy\/not buy).<\/li>\n<li>Data is showing a constant coefficient of variation (e.g. time data with gamma errors).<\/li>\n<\/ul>\n<p><em><strong>Learn about the concept of <a href=\"https:\/\/data-flair.training\/blogs\/generalized-linear-models-in-r\/\">Generalized Linear Models in R Programming<\/a> in detail\u00a0<\/strong><\/em><\/p>\n<h3>Logistic Regression in R<\/h3>\n<p>In statistics, logistic regression is one of the most commonly used forms of nonlinear regression. <em>It is used to estimate the probability of an event based on one or more independent variables.<\/em> Logistic regression identifies the relationships between the <em>enumerated variables<\/em> and <em>independent variables<\/em> using the probability theory.<\/p>\n<p>A variable is said to be enumerated if it can possess only one value from a given set of values.<\/p>\n<p>Logistic Regression Models are generally used in cases when the rate of growth does not remain constant over a period of time. <strong>For example<\/strong>\u00a0-when a new technology is introduced in the market, firstly its demand increases at a faster rate but then gradually slows down.<\/p>\n<p><strong>Logistic Regression Types:<br \/>\n<\/strong><\/p>\n<ul>\n<li><strong>Multivariate<\/strong> <strong>Logistic Regression<\/strong>\u00a0&#8211; Here <em>logistic regression includes more than one independent variable.<\/em> Multivariate logistic regression is commonly used in the fields of medical and social science. It is also used to make electoral assumptions such as the percentage of voting in a particular area; the ratio of voters in terms of sex, age, annual income, and residential location; and the chances of a particular candidate to win or lose from that area. This analysis helps to predict the level of the failure or success of a proposed system, product, or process.<\/li>\n<li><strong>Multinomial<\/strong> <strong>Logistic Regression<\/strong>\u00a0&#8211; Here <em>set of possible values are more than two.<\/em> It is used to estimate the value of an enumerated variable when the value of the variable depends on the values of two or more variables.<\/li>\n<\/ul>\n<p>Logistic regression is defined using<em> logit()<\/em> function:<\/p>\n<p style=\"text-align: center\"><em>f(x) = logit(x) = log(x\/(1-x))<\/em><\/p>\n<p>Suppose p(x) represents the probability of the occurrence of an event, such as diabetes and on the basis of an independent variable, such as age of a person. The probability p(x) will be given as follows:<\/p>\n<p style=\"text-align: center\"><em>P(x)=exp(\u03b2<sub>0<\/sub>+ \u03b2<sub>1<\/sub>x<sub>1<\/sub> )\/(1+ exp(\u03b2<sub>0<\/sub>+ \u03b2<sub>1<\/sub>x<sub>1<\/sub>)))<\/em><\/p>\n<p>Here \u03b2 is a regression coefficient.<\/p>\n<p>On taking the logit of the above equation, we get:<\/p>\n<p style=\"text-align: center\"><em>logit(P(x))=log(1\/(1-P(x)))<\/em><\/p>\n<p>On solving the above equation, we get:<\/p>\n<p style=\"text-align: center\"><em>logit(P(x))=\u03b2<sub>0<\/sub>+ \u03b2<sub>1<\/sub>x<sub>1<\/sub><\/em><\/p>\n<p>The logistic function that is represented by an S-shaped curve is known as the<strong> Sigmoid Function.<\/strong><\/p>\n<p>When a new technology comes in the market, usually its demand increases at a fast rate in the first few months and then gradually slows down over a period of time. This is an example of logistic regression. Logistic Regression Models are generally used in cases where the rate of growth does not remain constant over a period of time.<\/p>\n<p><strong>Multivariate logit() Function<\/strong><\/p>\n<p>In case of multiple predictor variables, following equation represent logistic function:<\/p>\n<p style=\"text-align: center\"><em>p = exp(\u03b2<sub>0<\/sub>+ \u03b2<sub>1<\/sub>x<sub>1<\/sub>+ \u03b2<sub>2<\/sub>x<sub>2<\/sub>+&#8212;&#8211; \u03b2<sub>n<\/sub>x<sub>n<\/sub>)\/(1+exp(\u03b2<sub>0<\/sub>+ \u03b2<sub>1<\/sub>x<sub>1<\/sub>+ \u03b2<sub>2<\/sub>x<sub>2<\/sub>+\u2026+\u03b2<sub>n<\/sub>x<sub>n<\/sub>))<\/em><\/p>\n<p>Here, p is the expected probability; x<sub>1<\/sub>,x<sub>2<\/sub>,x<sub>3<\/sub>,\u2026,x<sub>n<\/sub> are independent variables; and \u03b2<sub>0<\/sub>, \u03b2<sub>1<\/sub>, \u03b2<sub>2<\/sub>,\u2026\u03b2<sub>n<\/sub> are the regression coefficients.<\/p>\n<p><em>Estimating \u03b2 Coefficients manually is an error-prone and time-consuming process, as it involves lots of complex and lengthy calculations.<\/em> Therefore, such estimates are generally made by using <strong>sophisticated statistical software.<\/strong><\/p>\n<p>\u03b2 coefficients need to be calculated in statistical analysis. For this, follow the below steps:<\/p>\n<ul>\n<li>Firstly, you need to calculate the logarithmic value of the probability function.<\/li>\n<li>Now, calculate the partial derivatives with respect to each \u03b2 coefficient. For n number of unknown \u03b2 coefficients, there will be n equations.<\/li>\n<li>For n unknown \u03b2 coefficients, you need to set n equations.<\/li>\n<li>Finally, to get the values of the \u03b2 coefficients, you can solve the n equations for n unknown \u03b2 coefficients.<\/li>\n<\/ul>\n<p>Interaction is a relationship among three or more variables to specify the simultaneous effect of two or more interacting variables on a dependent variable. We can calculate the logistic regression with interacting variables, that is three or more variables in relation where two or more independent variables affect the dependent variable.<\/p>\n<p>In logistic regression, an enumerated variable can have an order but it cannot have magnitude. This makes arrays unsuitable for storing enumerated variables because arrays possess both order and magnitude. Thus, enumerated variables are stored by using dummy or indicator variables. These dummy or indicator variables can have two values: 0 or 1.<\/p>\n<p>After developing a Logistic Regression Model, you have to check its accuracy for predictions. Adequacy Checking Techniques are explained below:<\/p>\n<ul>\n<li><strong>Residual Deviance &#8211;<\/strong>\u00a0High residual variation refers to insufficient Logistic Regression Model. The ideal value of residual variance Logistic Regression Model is 0.<\/li>\n<li><strong>Parsimony &#8211;<\/strong> Logistic Regression Models with less number of explanatory variables are more reliable than models with a large number of explanatory variables and can be more useful also.<\/li>\n<li><strong>Classification Accuracy &#8211;<\/strong> It refers to the process of setting the threshold probability for a response variable on the basis of explanatory variables. It helps to interpret the result of a Logistic Regression Model easily.<\/li>\n<li><strong>Prediction Accuracy &#8211;<\/strong> To check the accuracy of predictions for the Logistic Regression Model, cross-validation is used which is repeated several times to improve the prediction accuracy of the Logistic Regression Model.<\/li>\n<\/ul>\n<p><em><strong>You must definitely learn about the <a href=\"https:\/\/data-flair.training\/blogs\/logistic-regression-in-r\/\">Implementation of Logistic Regression in R<\/a><\/strong><\/em><\/p>\n<h3>Applications of Logistic Regression<\/h3>\n<p>Logistic regression is the most commonly used form of regression analysis in real life. As a result, they are quite useful for classifying new cases into one of the two outcome categories.<\/p>\n<p>Let&#8217;s check some of the applications:<\/p>\n<ul>\n<li><strong>Loan Acceptance &#8211;<\/strong> By using logistic regression, on the basis of the customer\u2019s previous behaviour, organizations which provide banks or loan can determine whether the customer would accept an offered loan or not. Various explanatory variables include the <em>age of customer, experience, the income of the customer, family size of customer, CCAvg, Mortgage,<\/em> etc.<\/li>\n<li><strong>German Credit Data<\/strong> &#8211; The German credit dataset was obtained from the UCI (the University of California at Irwin) Machine Learning Repository (Asuncion and Newman, 2007). The dataset, which contains attributes and outcomes of 1,000 loan applications, was provided in 1994 by Dr Hans Hofmann of the institute,f\u00fcr Statistik und \u00d6konometrie at the University of Hamburg. It also served as an important test dataset for several credits coring algorithms. The logistic expression is used to estimate the probability of default, <em>using continuous variables (duration, amount, instalment, age) and categorical variables (loan history, purpose, foreign, rent) as explanatory variables.<\/em><\/li>\n<li><strong>Delayed Airplanes &#8211;<\/strong> Logistic regression analysis can also predict a possible delay in airplane timing. Explanatory variables include <em>different arrival airports, different departure airports, carriers, weather conditions, the day of the week and a categorical variable for different hours of departure.<\/em><\/li>\n<\/ul>\n<h3>Line Estimation using MLE<\/h3>\n<p>Regression lines for models are generated on the basis of the parameter values that appear in the regression model. So first you need to estimate the parameters for the regression model. Parameter estimation is used to improve the accuracy of linear and nonlinear statistical models.<\/p>\n<p>The process of estimating the parameters of a regression model is called\u00a0<strong>Maximum Likelihood Estimation (MLE)<\/strong>.<\/p>\n<p>We can estimate the parameters in any of the following ways:<\/p>\n<ul>\n<li>You can specify the model parameters with certain conditions, such as the resistance of a mechanical engine and inertia.<\/li>\n<li>You can manipulate input and output test data, such as the rate of the influx of current and output of the mechanical engine in round per minute (rpm).<\/li>\n<li>On different values of a variable, you can perform a number of measurements for a function.<\/li>\n<\/ul>\n<p>The presence of bias while collecting data for parameter estimation might lead to uneven and misleading results. Bias can occur while selecting the sample or collecting the data.<\/p>\n<p><em><strong>Don&#8217;t forget to check the <a href=\"https:\/\/data-flair.training\/blogs\/r-statistics\/\">R Statistics Tutorial<\/a><\/strong><\/em><\/p>\n<h3>Transformation of a Nonlinear Model into a Linear Model<\/h3>\n<p><strong>Linear least square method<\/strong> fits data points of a model in a straight line. However, in many cases, data points form a curve.<\/p>\n<p>Nonlinear models are sometimes fitted into linear models by using certain techniques as linear models are easy to use. Consider the following equation which is a nonlinear equation for exponential growth rate:<\/p>\n<p style=\"text-align: center\"><em>y=ce<sup>bx<\/sup>u<\/em><\/p>\n<p>Here b is the growth rate while u is the random error term and c is a constant.<\/p>\n<p>We can plot a graph of the above equation by using the\u00a0linear regression method. Implement the following steps to transform the above nonlinear equation into a linear equation, as follows:<\/p>\n<ul>\n<li>On taking these base logarithm of the equation, you get the result as <em>In(y)-In(c)+bx+In(u)<\/em>.<\/li>\n<li>Now, if you substitute Y for In(y), C for In(c), and U for In(u), you will get the following result: <em>Y-A+bx+U<\/em>.<\/li>\n<\/ul>\n<h3>Other R Nonlinear Regression Models<\/h3>\n<p>There are several models for specifying the relationship between y and x and estimate the parameters and standard errors of parameters of a specific nonlinear equation from data.<\/p>\n<p>Some of the most frequently appearing nonlinear regression models are:<\/p>\n<p><strong>a) Michaelis-Menten<\/strong><\/p>\n<p style=\"text-align: center\"><em>y=ax\/(1+bx)<\/em><\/p>\n<p><strong>b) 2-parameter asymptotic exponential<\/strong><\/p>\n<p style=\"text-align: center\"><em>y=a(1\u2212e-bx)<\/em><\/p>\n<p><strong>c) 3-parameter asymptotic exponential<\/strong><\/p>\n<p style=\"text-align: center\"><em>y=a\u2212be\u2212cx<\/em><\/p>\n<p>Below are few<em><strong> S-shaped Functions:<\/strong><\/em><\/p>\n<p><strong>d) 2-parameter logistic<\/strong><\/p>\n<p style=\"text-align: center\"><em>y=( ea+bx)\/(1+ea+bx)<\/em><\/p>\n<p><strong>e) 3-paramerter logistic<\/strong><\/p>\n<p style=\"text-align: center\"><em>y=a\/(1+be\u2212cx)<\/em><\/p>\n<p><strong>f) 3-parameter asymptotic exponential<\/strong><\/p>\n<p style=\"text-align: center\"><em>y=a\/(1+be\u2212cx)<\/em><\/p>\n<p><strong>g) Weibull<\/strong><\/p>\n<p style=\"text-align: center\"><em>y=a- be<sup>-(cx2)<\/sup><\/em><\/p>\n<p>Below are few<em><strong>\u00a0Humped Curves<\/strong><\/em>:<\/p>\n<p><strong>h) Ricker curve<\/strong><\/p>\n<p style=\"text-align: center\"><em>y=axe\u2212bx<\/em><\/p>\n<p><strong>i) First-order compartment<\/strong><\/p>\n<p style=\"text-align: center\"><em>y=kexp(\u2212exp(a)x)\u2212exp(\u2212exp(b)x)<\/em><\/p>\n<p><strong>j) Bell-shaped<\/strong><\/p>\n<p style=\"text-align: center\"><em>y=a exp(\u2212|bx|2)<\/em><\/p>\n<p><strong>k) Biexponential<\/strong><\/p>\n<p style=\"text-align: center\"><em>y=aebx \u2212ce\u2212dx<\/em><\/p>\n<p>The accuracy of a statistical interpretation largely depends on the correctness of the statistical model on which it depends.<\/p>\n<p>The following are the most common statistical models:<\/p>\n<ul>\n<li><strong>Fully Parametric &#8211; <\/strong>In this model, assumptions are on the basis of the number of parameters known.<\/li>\n<\/ul>\n<ul>\n<li><strong>Non-Parametric &#8211; <\/strong>In this model, assumptions are on the basis of the features of the available data. These models do not use parameters to describe the process of generating data.<\/li>\n<li><strong>Semi Parametric &#8211; <\/strong>In this model, both parametric and nonparametric approaches describe the process of data generation. These models use parameters as well as the main features of the data to derive conclusions.<\/li>\n<\/ul>\n<p>An example of nonlinear regression: This example is based on the relationship between jaw bone length and age in deers.<\/p>\n<ul>\n<li><strong>Reading the dataset from jaws.txt file<\/strong>; Path of the file acts as an argument.<\/li>\n<\/ul>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">deer&lt;-read.table(\"c:\\\\temp\\\\jaws.txt\",header=T)<\/pre>\n<p>You can download the dataset from here &#8211; <a href=\"https:\/\/drive.google.com\/open?id=1RmDs1hWcgYGD0GxbXliLAOoDT50p-cL0\">jaws file<\/a><\/p>\n<ul>\n<li><strong>Fitting the model &#8211;<\/strong> Nonlinear equation is an argument in <em>nls()<\/em> command with starting values of a, b and c parameters. The result goes in the model object.<\/li>\n<\/ul>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">model&lt;-nls(bone~a-b*exp(-c*age),start=list(a=120,b=110,c=0.064))<\/pre>\n<ul>\n<li><strong>Displaying information about a model object<\/strong> using the <em>summary() <\/em>command. The model object is an argument to the summary() command as shown below:<\/li>\n<\/ul>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">summary(model)<\/pre>\n<p><strong>Output:<\/strong><\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2017\/07\/deer-read-table.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-65482\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2017\/07\/deer-read-table.png\" alt=\"deer-read-table - R Nonlinear Regression Analysis\" width=\"1289\" height=\"768\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2017\/07\/deer-read-table.png 1289w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2017\/07\/deer-read-table-150x89.png 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2017\/07\/deer-read-table-300x179.png 300w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2017\/07\/deer-read-table-768x458.png 768w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2017\/07\/deer-read-table-1024x610.png 1024w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2017\/07\/deer-read-table-520x310.png 520w\" sizes=\"auto, (max-width: 1289px) 100vw, 1289px\" \/><\/a><\/p>\n<ul>\n<li><strong>Fitting a simpler model<\/strong><\/li>\n<\/ul>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">y=a (1\u2212e\u2212cx)<\/pre>\n<ul>\n<li><strong>Applying nls() command to the new model for the modified regression model<\/strong>. The result goes in the model2 object.<\/li>\n<\/ul>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">model2&lt;-nls(bone~a*(1-exp(-c*age)),start=list(a=120,c=0.064))<\/pre>\n<p><strong>Comparing the models as below &#8211;<\/strong> Use <em>anova()<\/em> command to compare result objectsmodel1 and model2. These objects then act as arguments to anova() command.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">anova(model,model2)<\/pre>\n<p><strong>Viewing the components of the New Model2<\/strong> as below:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">summary(model2)<\/pre>\n<p><strong>Output:<\/strong><\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2017\/07\/model-2-nls.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-65483\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2017\/07\/model-2-nls.jpg\" alt=\"model-2-nls - R Nonlinear Regression\" width=\"1300\" height=\"746\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2017\/07\/model-2-nls.jpg 1300w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2017\/07\/model-2-nls-150x86.jpg 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2017\/07\/model-2-nls-300x172.jpg 300w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2017\/07\/model-2-nls-768x441.jpg 768w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2017\/07\/model-2-nls-1024x588.jpg 1024w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2017\/07\/model-2-nls-520x298.jpg 520w\" sizes=\"auto, (max-width: 1300px) 100vw, 1300px\" \/><\/a><\/p>\n<p><em><strong>Wait! Have you completed the <a href=\"https:\/\/data-flair.training\/blogs\/r-graphical-models-tutorial\/\">R Graphical Models Tutorial<\/a><\/strong><\/em><\/p>\n<h3>Generalized Additive Models (GAM)<\/h3>\n<p>Sometimes we can see that the relationship between y and x is nonlinear but we don\u2019t have any theory or any mechanistic model to suggest a particular functional form (mathematical equation) to describe the relationship. In such circumstances, Generalized Additive Models (GAMs) are particularly useful because they fit a nonparametric curve to the data without requiring us to specify any particular mathematical model to describe the nonlinearity.<\/p>\n<p>GAMs are useful because they allow you to identify the relationship between y and x without choosing a particular parametric form. Generalized additive models implemented in <a href=\"https:\/\/en.wikipedia.org\/wiki\/R_(programming_language)\">R<\/a> by the function<em> gam()<\/em> command.<\/p>\n<p>The<em> gam() <\/em>command has many of the attributes of both <em>glm()<\/em> and<em> lm()<\/em>, and we can modify the output using <em>update() <\/em>command. You can use all of the familiar methods such as print, plot, summary, anova, predict, and fitted after a GAM has been fitted to data. The gam function is available in the<strong> mgcv library<\/strong>.<\/p>\n<h2>Self-Starting Functions<\/h2>\n<p>In nonlinear regression analysis, the nonlinear least-squares method becomes insufficient because the initial guesses by users for the starting parameter values may be wrong. The simplest solution is to use R\u2019s self-starting models.<\/p>\n<p>Self-starting models work out the starting values automatically and nonlinear regression analysis makes use of this to overcome the chances of the initial guesses, which the user tends to make, being wrong.<\/p>\n<p>Some of the most frequently used self-starting functions are:<\/p>\n<p><strong>1. Michaelis-Menten Model(SSmicmen)<\/strong><\/p>\n<p>R has a self-starting version called SSmicmen that is as follows:<\/p>\n<p style=\"text-align: center\"><em>y=ax\/(b+x)<\/em><\/p>\n<p>Here, a and b are two parameters, indicating the asymptotic value of y and x (value at which we get half of the maximum response a\/2) respectively.<\/p>\n<p><strong>2. Asymptotic Regression Model (SSasymp)<\/strong><\/p>\n<p>Below gives the self-starting version of the asymptotic regression model.<\/p>\n<p>3 parameter asymptotic exponential equation can be as:<\/p>\n<p style=\"text-align: center\"><em>y=a\u2212be<sup>\u2212cx<\/sup><\/em><\/p>\n<p>Here, a is a horizontal asymptote, b=a-R0 where R0 is the intercept (response when x is 0), and c is rate constant.<\/p>\n<p><strong>3. Four Parameter Logistic Model (SSfpl)<\/strong><\/p>\n<p style=\"text-align: center\"><em>y=A+(B-A)\/(1+e<sup>(D-x)\/c<\/sup>)<\/em><\/p>\n<p>Here, A is horizontal asymptote on left (for low values of x), B is horizontal asymptote on right (for large values of x), D is the value of x at the point of inflection of the curve, and c is a numeric scale parameter on the X-axis. It gives the self-starting version of four-parameter logistic regression.<\/p>\n<p><strong>4. Self-Starting First-Order Compartment Function (SSfol)<\/strong><\/p>\n<p>This function is given as follows:<\/p>\n<p style=\"text-align: center\"><em>y=k exp(\u2212exp(a)x)\u2212exp(\u2212exp(b)x)<\/em><\/p>\n<p>Here, k=Dose*exp(a+b\u2212c)\/(exp(b)- exp(a)) and Dose is a vector of identical values provided to the fit. It gives the self-starting version of first-order compartment function.<\/p>\n<p><strong>5. Self-Starting Weibull Growth Function (SSweibull)<\/strong><\/p>\n<p>R\u2019s parameterization of the Weibull growth function is as follows:<\/p>\n<p style=\"text-align: center\"><em>Asym-Drop*exp(-exp(lrc)*x^pwr)<\/em><\/p>\n<p>It gives the self-starting version of Weibull growth function.<\/p>\n<p>Here, <em>Asym<\/em> is the horizontal asymptote on the right<\/p>\n<p><em>Drop<\/em> is the difference between the asymptote and the intercept (the value of y at x=0)<\/p>\n<p><em>lrc<\/em> is the natural logarithm of the rate constant<\/p>\n<p><em>pwr<\/em> is the power to which x is raised.<\/p>\n<h2>Summary<\/h2>\n<p>We learned about the complete concept of nonlinear regression analysis in R programming. We understood the R logistic regression with its applications, line estimation using MLE, R nonlinear regression models and self-starting functions.<\/p>\n<p><em><strong>Now, we will learn to <a href=\"https:\/\/data-flair.training\/blogs\/r-decision-trees\/\">Create Decision Trees in R Programming<\/a><\/strong><\/em><\/p>\n<p>If you have any queries regarding R nonlinear regression, ask in the comment section.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Previously, we learned about R linear regression, now, it&#8217;s the turn for nonlinear regression in R programming. We will study about logistic regression with its types and multivariate logit() function in detail. We will&#46;&#46;&#46;<\/p>\n","protected":false},"author":6,"featured_media":65497,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[51],"tags":[20730,11233,20729,20731],"class_list":["post-3135","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-r","tag-r-logistic-regression","tag-r-nonlinear-regression","tag-r-nonlinear-regression-models","tag-r-self-starting-functions"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>R Nonlinear Regression Analysis - All-inclusive Tutorial for Newbies! - DataFlair<\/title>\n<meta name=\"description\" content=\"Learn about nonlinear regression analysis in R Programming with the concept of logistic regression, nonlinear regression models, generalized additive models and self-starting functions.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/data-flair.training\/blogs\/r-nonlinear-regression\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"R Nonlinear Regression Analysis - All-inclusive Tutorial for Newbies! - DataFlair\" \/>\n<meta property=\"og:description\" content=\"Learn about nonlinear regression analysis in R Programming with the concept of logistic regression, nonlinear regression models, generalized additive models and self-starting functions.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/data-flair.training\/blogs\/r-nonlinear-regression\/\" \/>\n<meta property=\"og:site_name\" content=\"DataFlair\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/DataFlairWS\/\" \/>\n<meta property=\"article:published_time\" content=\"2017-07-06T09:08:07+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-08-25T12:50:47+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2017\/07\/Nonlinear-regression-analysis-in-R.png\" \/>\n\t<meta property=\"og:image:width\" content=\"802\" \/>\n\t<meta property=\"og:image:height\" content=\"420\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"DataFlair Team\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@DataFlairWS\" \/>\n<meta name=\"twitter:site\" content=\"@DataFlairWS\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"DataFlair Team\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"13 minutes\" \/>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"R Nonlinear Regression Analysis - All-inclusive Tutorial for Newbies! - DataFlair","description":"Learn about nonlinear regression analysis in R Programming with the concept of logistic regression, nonlinear regression models, generalized additive models and self-starting functions.","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:\/\/data-flair.training\/blogs\/r-nonlinear-regression\/","og_locale":"en_US","og_type":"article","og_title":"R Nonlinear Regression Analysis - All-inclusive Tutorial for Newbies! - DataFlair","og_description":"Learn about nonlinear regression analysis in R Programming with the concept of logistic regression, nonlinear regression models, generalized additive models and self-starting functions.","og_url":"https:\/\/data-flair.training\/blogs\/r-nonlinear-regression\/","og_site_name":"DataFlair","article_publisher":"https:\/\/www.facebook.com\/DataFlairWS\/","article_published_time":"2017-07-06T09:08:07+00:00","article_modified_time":"2021-08-25T12:50:47+00:00","og_image":[{"width":802,"height":420,"url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2017\/07\/Nonlinear-regression-analysis-in-R.png","type":"image\/png"}],"author":"DataFlair Team","twitter_card":"summary_large_image","twitter_creator":"@DataFlairWS","twitter_site":"@DataFlairWS","twitter_misc":{"Written by":"DataFlair Team","Est. reading time":"13 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/data-flair.training\/blogs\/r-nonlinear-regression\/#article","isPartOf":{"@id":"https:\/\/data-flair.training\/blogs\/r-nonlinear-regression\/"},"author":{"name":"DataFlair Team","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/person\/2c58ecb4f73a39f0ef993f1ddfcd7b89"},"headline":"R Nonlinear Regression Analysis &#8211; All-inclusive Tutorial for Newbies!","datePublished":"2017-07-06T09:08:07+00:00","dateModified":"2021-08-25T12:50:47+00:00","mainEntityOfPage":{"@id":"https:\/\/data-flair.training\/blogs\/r-nonlinear-regression\/"},"wordCount":2645,"commentCount":5,"publisher":{"@id":"https:\/\/data-flair.training\/blogs\/#organization"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/r-nonlinear-regression\/#primaryimage"},"thumbnailUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2017\/07\/Nonlinear-regression-analysis-in-R.png","keywords":["R Logistic Regression","R nonlinear Regression","R Nonlinear Regression Models","R Self-Starting Functions"],"articleSection":["R Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/data-flair.training\/blogs\/r-nonlinear-regression\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/data-flair.training\/blogs\/r-nonlinear-regression\/","url":"https:\/\/data-flair.training\/blogs\/r-nonlinear-regression\/","name":"R Nonlinear Regression Analysis - All-inclusive Tutorial for Newbies! - DataFlair","isPartOf":{"@id":"https:\/\/data-flair.training\/blogs\/#website"},"primaryImageOfPage":{"@id":"https:\/\/data-flair.training\/blogs\/r-nonlinear-regression\/#primaryimage"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/r-nonlinear-regression\/#primaryimage"},"thumbnailUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2017\/07\/Nonlinear-regression-analysis-in-R.png","datePublished":"2017-07-06T09:08:07+00:00","dateModified":"2021-08-25T12:50:47+00:00","description":"Learn about nonlinear regression analysis in R Programming with the concept of logistic regression, nonlinear regression models, generalized additive models and self-starting functions.","breadcrumb":{"@id":"https:\/\/data-flair.training\/blogs\/r-nonlinear-regression\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/data-flair.training\/blogs\/r-nonlinear-regression\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/data-flair.training\/blogs\/r-nonlinear-regression\/#primaryimage","url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2017\/07\/Nonlinear-regression-analysis-in-R.png","contentUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2017\/07\/Nonlinear-regression-analysis-in-R.png","width":802,"height":420,"caption":"Nonlinear-regression-analysis-in-R"},{"@type":"BreadcrumbList","@id":"https:\/\/data-flair.training\/blogs\/r-nonlinear-regression\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Blog Home","item":"https:\/\/data-flair.training\/blogs\/"},{"@type":"ListItem","position":2,"name":"R Tutorials","item":"https:\/\/data-flair.training\/blogs\/category\/r\/"},{"@type":"ListItem","position":3,"name":"R Nonlinear Regression Analysis &#8211; All-inclusive Tutorial for Newbies!"}]},{"@type":"WebSite","@id":"https:\/\/data-flair.training\/blogs\/#website","url":"https:\/\/data-flair.training\/blogs\/","name":"DataFlair","description":"Learn Today. Lead Tomorrow.","publisher":{"@id":"https:\/\/data-flair.training\/blogs\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/data-flair.training\/blogs\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/data-flair.training\/blogs\/#organization","name":"DataFlair","url":"https:\/\/data-flair.training\/blogs\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/logo\/image\/","url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2016\/07\/Data-Flair.png","contentUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2016\/07\/Data-Flair.png","width":106,"height":48,"caption":"DataFlair"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/DataFlairWS\/","https:\/\/x.com\/DataFlairWS","https:\/\/www.linkedin.com\/company\/dataflair-web-services-pvt-ltd\/","https:\/\/www.youtube.com\/user\/DataFlairWS"]},{"@type":"Person","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/person\/2c58ecb4f73a39f0ef993f1ddfcd7b89","name":"DataFlair Team","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/1ce4a0e3e542444fc73bbebf83e89e8b73e2d95ccb1fcee64da9945f078b97c5?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/1ce4a0e3e542444fc73bbebf83e89e8b73e2d95ccb1fcee64da9945f078b97c5?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/1ce4a0e3e542444fc73bbebf83e89e8b73e2d95ccb1fcee64da9945f078b97c5?s=96&d=mm&r=g","caption":"DataFlair Team"},"description":"The DataFlair Team provides industry-driven content on programming, Java, Python, C++, DSA, AI, ML, data Science, Android, Flutter, MERN, Web Development, and technology. Our expert educators focus on delivering value-packed, easy-to-follow resources for tech enthusiasts and professionals.","url":"https:\/\/data-flair.training\/blogs\/author\/dfteam2\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/3135","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/comments?post=3135"}],"version-history":[{"count":11,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/3135\/revisions"}],"predecessor-version":[{"id":67174,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/3135\/revisions\/67174"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/media\/65497"}],"wp:attachment":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/media?parent=3135"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/categories?post=3135"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/tags?post=3135"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}