mmd.nl: MMD objective function for non-linear models

View source: R/dCovReg.R

mmd.nlR Documentation

MMD objective function for non-linear models

Description

mmd.nl computes the objective function of the MMD estimator for a non-linear model

Usage

mmd.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

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
mmd.nl(1,U.fun,Z=X)


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