sfactor2bw: Convert scale factors to bandwidths

Description Usage Arguments Value Author(s) See Also Examples

Description

Convert scale factors (relative measures of bandwidths) to (absolute) bandwidths.

Usage

1
   sfactor2bw( sfactor, varNames, data, order = 2, pre0.60 = FALSE )

Arguments

sfactor

a vector of scale factors of the explanatory variables.

varNames

a vector of the names of the explanatory variables.

data

data.frame with the that includes the explanatory variables.

order

order of the kernel for continuous explanatory variables.

pre0.60

logical. If FALSE (default), the conversion is done by the formula that is used in the np package version 0.60 or later. If TRUE, the conversion is done by the formula that is used in the np package before version 0.60.

Value

A vector of bandwidths.

Author(s)

Arne Henningsen

See Also

npreg.

Examples

1
2
3
4
5
6
7
8
9
   data( "oecdpanel" )
   
   oecdpanel$yearFactor <- factor( oecdpanel$year )
   npModel <- npreg( growth ~ yearFactor + initgdp, 
      regtype = "ll", gradients = TRUE, data = oecdpanel )
   
   all.equal( npModel$bws$bw,
      sfactor2bw( npModel$bws$sfactor$x, c( "yearFactor", "initgdp" ),
         data = oecdpanel ) )

micEconNP documentation built on May 2, 2019, 6:30 p.m.