Doubts about the model y = a / (x + b)? [closed]

1

Help! Hello everyone, does anyone know this model y = a / (ln (x) -b-e)? I would like any information about it to make the adjustment in R. The idea is to know if there is any restriction between the variables to make the adjustment or if it is possible to manipulate the model to make linear adjustments.

Thank you

    
asked by anonymous 08.01.2016 / 14:49

2 answers

6

The simplest way is to use a least-squares non-linear regression ( nls function). Mathematically, this is an iterative method, which looks for values for the parameters to reduce the residuals below a limit value.

An example usage is as follows:

set.seed(0)    
x <- rnorm(100)
y <- jitter(1234/(x + 1), 0.1)
dat <- data.frame(x = x, y = y)
nl <- nls(y ~ a/(x + b), data = dat, start = c(a = 1000, b = 2))

The results can be observed with the summary function:

> summary(nl)
# Formula: y ~ a/(x + b)
# 
# Parameters:
#   Estimate Std. Error t value Pr(>|t|)    
#   a 1132.5404   548.9356   2.063   0.0417 *  
#   b    1.9850     0.2013   9.863  2.4e-16 ***
#   ---
#   Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
# 
# Residual standard error: 4639 on 98 degrees of freedom
# 
# Number of iterations to convergence: 13 
# Achieved convergence tolerance: 9.861e-06

The estimate is not always "good", but it depends on the data and the function, not on the R.

    
08.01.2016 / 20:10
-2

It is possible to manipulate the model to arrive to make it linear, that's it make the regression simple.

y = a/(ln(x) -b - e)  

1/y = (ln(x)-b-E)/a
    = ln(x)/a - b/a - e/a
    = c*ln(x)+d + e' 
    
08.01.2016 / 20:08