mdep.nl: MDep objective function for non-linear models

View source: R/dCovReg.R

mdep.nlR Documentation

MDep objective function for non-linear models

Description

mdep.nl computes the objective function of the MDep estimator for a non-linear model

Usage

mdep.nl(theta, U.fun, Z = NULL, Z.m = NULL, sc = 1)

Arguments

theta

parameter vector

U.fun

user-written function of the disturbance function; evaluates to an n x 1 vector

Z

n x pz matrix of instruments; should be supplied in case Z.m is null

Z.m

D- or U-centred Euclidean matrix from instrument matrix Z - optional

sc

adjusts the objective function - positive for minimisation, negative for maximisation

Value

function value

Examples

## Generate data and run MMD regression
n=50; set.seed(12); X = rnorm(n); Y = X + (X^2-1)/sqrt(2)
U.fun=function(theta) Y^2-2*Y*(X*theta)-(X*theta)^2
mdep.nl(1,U.fun,X)


estsyawo/bayesprdopt documentation built on April 2, 2024, 2:18 p.m.