Semiparametric estimate for the parametric component of the regression function in PLR models

Share:

Description

This routine computes estimates for β from a sample {(Y_i, X_{i1}, ..., X_{ip}, t_i): i=1,...,n}, where:

β = (β_1,...,β_p)

is an unknown vector parameter and

Y_i= X_{i1}*β_1 +...+ X_{ip}*β_p + m(t_i) + ε_i.

The nonparametric component, m, is a smooth but unknown function, and the random errors, ε_i, are allowed to be time series. Ordinary least squares estimation, combined with kernel smoothing, is used.

Usage

1
plrm.beta(data = data, b.seq = NULL, estimator = "NW", kernel = "quadratic")

Arguments

data

data[, 1] contains the values of the response variable, Y;

data[, 2:(p+1)] contains the values of the "linear" explanatory variables,

X_1, ..., X_p;

data[, p+2] contains the values of the "nonparametric" explanatory variable, t.

b.seq

vector of bandwidths for estimating β. If NULL (the default), only one estimate of β is computed, the corresponding bandwidth being selected by means of the cross-validation procedure.

estimator

allows us the choice between “NW” (Nadaraya-Watson) or “LLP” (Local Linear Polynomial). The default is “NW”.

kernel

allows us the choice between “gaussian”, “quadratic” (Epanechnikov kernel), “triweight” or “uniform” kernel. The default is “quadratic”.

Details

The expression for the estimator of β can be seen in page 52 in Aneiros-Perez et al. (2004).

Value

A list containing:

BETA

p x length(b.seq) matrix containing the estimate of β for each bandwidth in h.seq.

G

n x p x length(b.seq) array containing the nonparametric estimate of

E(X_{ij} | t_i) (i=1,...,n; j=1,...,p) for each bandwidth in b.seq.

Author(s)

German Aneiros Perez ganeiros@udc.es

Ana Lopez Cheda ana.lopez.cheda@udc.es

References

Aneiros-Perez, G., Gonzalez-Manteiga, W. and Vieu, P. (2004) Estimation and testing in a partial linear regression model under long memory dependence. Bernoulli 10, 49-78.

Hardle, W., Liang, H. and Gao, J. (2000) Partially Linear Models. Physica-Verlag.

Speckman, P. (1988) Kernel smoothing in partial linear models. J. R. Statist. Soc. B 50, 413-436.

See Also

Other related functions are: plrm.est, plrm.gcv, plrm.cv.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# EXAMPLE 1: REAL DATA
data(barnacles1)
data <- as.matrix(barnacles1)
data <- diff(data, 12)
data <- cbind(data,1:nrow(data))

b.h <- plrm.gcv(data)$bh.opt
ajuste <- plrm.beta(data=data, b=b.h[1])
ajuste$BETA



# EXAMPLE 2: SIMULATED DATA
## Example 2a: independent data

set.seed(1234)
# We generate the data
n <- 100
t <- ((1:n)-0.5)/n
beta <- c(0.05, 0.01)
m <- function(t) {0.25*t*(1-t)}
f <- m(t)

x <- matrix(rnorm(200,0,1), nrow=n)
sum <- x%*%beta
epsilon <- rnorm(n, 0, 0.01)
y <-  sum + f + epsilon
data_ind <- matrix(c(y,x,t),nrow=100)

# We estimate the parametric component of the PLR model
# (GCV bandwidth)
a <- plrm.beta(data_ind)

a$BETA


## Example 2b: dependent data

set.seed(1234)
# We generate the data
x <- matrix(rnorm(200,0,1), nrow=n)
sum <- x%*%beta
epsilon <- arima.sim(list(order = c(1,0,0), ar=0.7), sd = 0.01, n = n)
y <-  sum + f + epsilon
data_dep <- matrix(c(y,x,t),nrow=100)


# We estimate the parametric component of the PLR model
# (CV bandwidth)
b <- plrm.cv(data_dep, ln.0=2)$bh.opt[2,1]
a <-plrm.beta(data_dep, b=b)

a$BETA

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.