getDerivative: Combined Derivative Computation of beta's.

Description Usage Arguments Details Value Dependencies Author(s) See Also

Description

Computes the β for each interation.

Usage

1
getDerivative(formula, n.vars, family, learningrate, dif, datasources)

Arguments

formula

a character that can be coerced to an object of class formula. It is a symbolic description of the model to be fitted.

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 family is set to 'binomial' it defines the link function as logit, and likelihood as binomial. If family is set to 'poisson' it defines the link function as log, and likelihood as poisson.

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 data frame, from opal datasources.

Details

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.

Value

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.

Dependencies

getDerivativeDS

Author(s)

Paula R. Silva

See Also

Other regressions: ds.linear, ds.logistic, ds.poisson


paularaissa/distStatsClient documentation built on June 19, 2019, 12:43 a.m.