62 <strong>np</strong>plotplot.errors.method = c("none","bootstrap","asymptotic"),plot.errors.boot.num = 399,plot.errors.boot.method = c("inid", "fixed", "geom"),plot.errors.boot.blocklen = NULL,plot.errors.center = c("estimate","bias-corrected"),plot.errors.type = c("standard","quantiles"),plot.errors.quantiles = c(0.025,0.975),plot.errors.style = c("bar","band"),plot.errors.bar = c("|","I"),plot.errors.bar.num = min(neval,25),plot.bxp = FALSE,plot.bxp.out = TRUE,...,random.seed)## S3 method for class 'sibandwidth':<strong>np</strong>plot(bws,xdat,ydat,data = NULL,common.scale = TRUE,gradients = FALSE,main = "",type = "l",ylim = NULL,plot.behavior = c("plot","plot-data","data"),plot.errors.method = c("none","bootstrap","asymptotic"),plot.errors.boot.num = 399,plot.errors.boot.method = c("inid", "fixed", "geom"),plot.errors.boot.blocklen = NULL,plot.errors.center = c("estimate","bias-corrected"),plot.errors.type = c("standard","quantiles"),plot.errors.quantiles = c(0.025,0.975),plot.errors.style = c("bar","band"),plot.errors.bar = c("|","I"),plot.errors.bar.num = NULL,...,random.seed)Argumentsbwsa bandwidth specification. This should be a bandwidth object returned from aninvocation of <strong>np</strong>udensbw, <strong>np</strong>cdensbw, <strong>np</strong>regbw, <strong>np</strong>plregbw, <strong>np</strong>indexbw, or<strong>np</strong>scoefbw.... additional arguments supplied to control various aspects of plotting, dependingon the type of object to be plotted, detailed below.dataan optional data frame, list or environment (or object coercible to a data frame by
<strong>np</strong>plot 63xdatydatzdatxqyqzqxtrimytrimztrimnevalas.data.frame) containing the variables in the model. If not found in data,the variables are taken from environment(bws), typically the environmentwhere the bandwidth object was generated.a p-variate data frame of sample realizations (training data).a q-variate data frame of sample realizations (training data). In a regression orconditional density context, this is the dependent data.a p-variate data frame of sample realizations (training data).a numeric p-vector of quantiles. Each element i of xq corresponds to the ithcolumn of txdat. Defaults to the median (0.5). See details.a numeric q-vector of quantiles. Each element i of yq corresponds to the ith columnof tydat. Only to be specified in a conditional density context. Defaultsto the median (0.5). See details.a numeric q-vector of quantiles. Each element i of zq corresponds to the ithcolumn of tzdat. Only to be specified in a semiparametric model context.Defaults to the median (0.5). See details.a numeric p-vector of quantiles. Each element i of xtrim corresponds to theith column of txdat. Defaults to 0.0. See details.a numeric q-vector of quantiles. Each element i of ytrim corresponds to theith column of tydat. Defaults to 0.0. See details.a numeric q-vector of quantiles. Each element i of ztrim corresponds to theith column of tzdat. Defaults to 0.0. See details.an integer specifying the number of evaluation points. Only applies to continuousvariables however, as discrete variables will be evaluated once at eachcategory. Defaults to 50.common.scale a logical value specifying whether or not all graphs are to be plotted on a commonscale. Defaults to TRUE.perspectivequantreggradientscdfmaintypeylimthetaphia logical value specifying whether a perspective plot should be displayed (ifpossible). Defaults to TRUE.a logical value specifying whether a quantile regression should be plotted (conbandwidthobjects only). See related parameter ’tau’. Defaults to FALSE.a logical value specifying whether gradients should be plotted (if possible). Defaultsto FALSE.a logical value specifying whether cumulative distributions should be plottedinstead of densities (when appropriate). Defaults to FALSE.the title, see titlecharacter indicating the type of plotting; actually any of the types as in plot.defaulta two-element numeric vector of the minimum and maximum y plotting limits.Defaults to NULL.a numeric value specifying the starting azimuthal angle of the perspective plot.Defaults to 0.0.a numeric value specifying the starting zenith angle of the perspective plot. Defaultsto 10.0.
- Page 1 and 2:
The np PackageFebruary 16, 2008Vers
- Page 3 and 4:
Italy 3Examplesdata("cps71")attach(
- Page 5 and 6:
wage1 5Examplesdata("oecdpanel")att
- Page 7 and 8:
gradients 7## S3 method for class '
- Page 9 and 10:
np 9A variety of bandwidth methods
- Page 11 and 12: npcmstest 11npcmstestKernel Consist
- Page 13 and 14: npcmstest 13ReferencesAitchison, J.
- Page 15 and 16: npcdens 15npcdensKernel Conditional
- Page 17 and 18: npcdens 17Valuenpcdens returns a co
- Page 19 and 20: npcdens 19# Gaussian kernel (defaul
- Page 21 and 22: npcdens 21# (1993) (see their descr
- Page 23 and 24: npcdensbw 23fit
- Page 25 and 26: npcdensbw 25na.actionxdatydatbwspro
- Page 27 and 28: npcdensbw 27data. The approach is b
- Page 29 and 30: npconmode 29# depending on the spee
- Page 31 and 32: npconmode 31tydatexdateydata one (1
- Page 33 and 34: npconmode 33lwt,family=binomial(lin
- Page 35 and 36: npudens 35npudensKernel Density and
- Page 37 and 38: npudens 37Author(s)Tristen Hayfield
- Page 39 and 40: npudens 39# EXAMPLE 1 (INTERFACE=DA
- Page 41 and 42: npudensbw 41library("datasets")data
- Page 43 and 44: npudensbw 43bwsa bandwidth specific
- Page 45 and 46: npudensbw 45fvalobjective function
- Page 47 and 48: npudensbw 47# previous examples.bw
- Page 49 and 50: npudensbw 49# previous examples.bw
- Page 51 and 52: npksum 51Argumentsformuladatanewdat
- Page 53 and 54: npksum 53Usage IssuesIf you are usi
- Page 55 and 56: npksum 55# the bandwidth object its
- Page 57 and 58: npksum 57ss
- Page 59 and 60: npplot 59plot.behavior = c("plot","
- Page 61: npplot 61xtrim = 0.0,neval = 50,com
- Page 65 and 66: npplot 65DetailsValuenpplot is a ge
- Page 67 and 68: npplot 67year.seq
- Page 69 and 70: npplot 69# npplot(). When npplot()
- Page 71 and 72: npplreg 71## S3 method for class 'c
- Page 73 and 74: npplreg 73residR2MSEMAEMAPECORRSIGN
- Page 75 and 76: npplreg 75# Plot the regression sur
- Page 77 and 78: npplregbw 77and dependent data), an
- Page 79 and 80: npplregbw 79Detailsnpplregbw implem
- Page 81 and 82: npplregbw 81x2
- Page 83 and 84: npqcmstest 83npqcmstestKernel Consi
- Page 85 and 86: npqcmstest 85Author(s)Tristen Hayfi
- Page 87 and 88: npqreg 87ftol = 1.19209e-07,tol = 1
- Page 89 and 90: npqreg 89Li, Q. and J.S. Racine (20
- Page 91 and 92: npreg 91Usagenpreg(bws, ...)## S3 m
- Page 93 and 94: npreg 93residR2MSEMAEMAPECORRSIGNif
- Page 95 and 96: npreg 95summary(model)# Use npplot(
- Page 97 and 98: npreg 97# - this may take a few min
- Page 99 and 100: npreg 99# then a noisy samplen
- Page 101 and 102: npregbw 101## S3 method for class '
- Page 103 and 104: npregbw 103ckerorderukertypeokertyp
- Page 105 and 106: npregbw 105ReferencesAitchison, J.
- Page 107 and 108: npsigtest 107bw
- Page 109 and 110: npsigtest 109Author(s)Tristen Hayfi
- Page 111 and 112: npindex 111Usagenpindex(bws, ...)##
- Page 113 and 114:
npindex 113MAEMAPECORRSIGNif method
- Page 115 and 116:
npindex 115x2
- Page 117 and 118:
npindex 117# x1 is chi-squared havi
- Page 119 and 120:
npindexbw 119# plotting via persp()
- Page 121 and 122:
npindexbw 121methodnmultithe single
- Page 123 and 124:
npindexbw 123allows one to deploy t
- Page 125 and 126:
npscoef 125x1
- Page 127 and 128:
npscoef 127Valueeydatezdaterrorsres
- Page 129 and 130:
npscoef 129# We could manually plot
- Page 131 and 132:
npscoefbw 131optim.abstol,optim.max
- Page 133 and 134:
npscoefbw 133optim.maxattemptsmaxim
- Page 135 and 136:
npscoefbw 135ReferencesAitchison, J
- Page 137 and 138:
uocquantile 137uocquantileCompute Q
- Page 139:
INDEX 139npconmode, 29npindex, 110n