rdq.condf | R Documentation |
rdq.condf
estimates conditional density functions by using the differencing method.
rdq.condf(x, Q, bcoe, taus, taul, delta, cov)
x |
a vector (or a matrix) of covariates. |
Q |
a vector of estimated conditional quantiles. |
bcoe |
quantile regression coefficient estimates. |
taus |
a vector of quantiles of interest. |
taul |
a vector of quantiles used for the conditional density estimation. It is needed to estimate the tail parts of conditional density functions more precisely. |
delta |
bandwidths for estimating the conditional density. |
cov |
either 0 or 1. Set |
conditional density function estimates
n = 500
x = runif(n,min=-4,max=4)
d = (x > 0)
y = x + 0.3*(x^2) - 0.1*(x^3) + 1.5*d + rnorm(n)
tlevel = seq(0.1,0.9,by=0.1)
hh = rep(2,length(tlevel))
ab = rdq(y=y,x=x,d=d,x0=0,z0=NULL,tau=tlevel,h.tau=hh,cov=0)
delta = 0.186
fe = rdq.condf(x=x,Q=ab$qp.est,bcoe=ab$bcoe.p,taus=0.5,taul=tlevel,delta=delta,cov=0)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.