Description Usage Arguments Details Value Dependencies Author(s) See Also
Computes the β for each interation.
1 | getDerivative(formula, n.vars, family, learningrate, dif, datasources)
|
formula |
a character that can be coerced to an object of class |
n.vars |
a numeric, the number of study variables. |
family |
a string character with the name of the error distribution and link function to be used in the analysis.
If |
learningrate |
a numeric, controls how much we are adjusting the regression model. |
dif |
a numeric, controls the learning convergence. |
datasources |
a list of opal object(s) obtained after login in to opal servers;
these objects hold also the data assign to R, as |
The straightforward way to compute the b coefficients is the Newton's method. Suppose that there is a valued function y = f(b). The problem is find the value b[k] such that f(b[k]) = 0. Starting with an initial value for b[0], the Taylor expansion of f can be done around b[0]:
f(b[0] + β) =~ f(b[0]) + f'(b[0]) * β
The f' is a matrix, a Jacobean if first derivative of f with respect to b. In this equation, setting the left side as zero, the β can be solved as
β[0] = -[f'(β[0])]^(-1) * f(b[0])
So the update of estimated for b is:
b[1] = b[0] + β[0]
and iterate until convergence.
Returns a list with the following components:
call |
the model formula. |
coefficients |
a vector of linear regression coefficients. |
xtxw |
a data matrix, the Hessian matrix. |
xtyp |
a data matrix, that integrates the computation of derivatives. |
getDerivativeDS
Paula R. Silva
Other regressions: ds.linear
,
ds.logistic
, ds.poisson
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.