betareg_model: Compute the Beta regression model

Description Usage Arguments Value Mathematical formula Author(s) See Also

Description

These functions evaluate the Beta regression model likelihood and gradient.There are also functions to compute the sum of Beta regression likelihoods and weighted sum of BPR likelihoods. They are written in C++ for efficiency (not yet!!).

Usage

1
2
3
4
5
6
7
8
9
betareg_likelihood(w, H, data, lambda = 1/2, is_NLL = FALSE)

betareg_gradient(w, H, data, lambda = 1/2, is_NLL = FALSE)

sum_weighted_betareg_lik(w, x, des_mat, post_prob, lambda = 1/2,
  is_NLL = TRUE)

sum_weighted_betareg_grad(w, x, des_mat, post_prob, lambda = 1/2,
  is_NLL = TRUE)

Arguments

w

A vector of parameters (i.e. coefficients of the basis functions)

H

The L x M matrix design matrix, where L is the number of observations and M the number of basis functions.

data

An L x 2 matrix containing in the 1st column are the observations, in the 2nd column are the proportions. Each row corresponds to each row of the design matrix.

lambda

The complexity penalty coefficient for penalized regression.

is_NLL

Logical, indicating if the Negative Log Likelihood should be returned.

x

A list of elements of length N, where each element is an L x 2 matrix of observations, where 1st column contains the locations. The 2nd column contains the proportions.

des_mat

A list of length N, where each element contains the L x M design matrices, where L is the number of observations and M the number of basis functions.

post_prob

A vector of length N containing the posterior probabilities for each element of list x, respectively.

Value

Either the Beta regression log likelihood or the gradient.

Mathematical formula

The Beta distributed Probit Regression log likelihood function is computed by the following formula:

log p(y | x, w) = ∑_{l=1}^{L} log Beta(y_{l} | t_{l}, Φ(w^{T}h(x_{l})))

where h(x_l) are the basis functions, and Beta is reparametrized to contain mean and dispersion parameters.

Author(s)

C.A.Kapourani C.A.Kapourani@ed.ac.uk

See Also

eval_functions, betareg_optimize


andreaskapou/BPRMeth-devel documentation built on May 12, 2019, 3:32 a.m.