bayMCMC_semi_global: Bayesian bandwidth estimation for a semi-functional partial...

Description Usage Arguments Details Value Note Author(s) References See Also Examples

Description

Estimate the bandwidths in both the regression function containing real-valued and function-valued predictors and kernel-form error density with a global bandwidth, in a semi-functional partial linear model

Usage

1
2
3
4
bayMCMC_semi_global(data_x, data_y, data_xnew, Xvar, Xvarpred, warm = 1000, M = 1000, 
	mutprob = 0.44, errorprob = 0.44, mutsizp = 1, errorsizp = 1, prior_alpha = 1, 
		prior_beta = 0.05, err_int = c(-10, 10), err_ngrid = 10001, 
			num_batch = 20, step = 10, alpha, ...)

Arguments

data_x

An (n by p) matrix of discretised data points of functional curves

data_y

A scalar-valued response of length n

data_xnew

A matrix of discretised data points of new functional curve(s)

Xvar

Real-valued predictors. For example, n by 2 matrix

Xvarpred

Real-valued predictors for prediction.

warm

Number of iterations for the burn-in period

M

Number of iterations for the Markov chain Monte Carlo (MCMC)

mutprob

Optimal acceptance rate of the random-walk Metropolis algorithm for sampling the bandwidth in the regression function

errorprob

Optimal acceptance rate of the random-walk Metropolis algorithm for sampling the bandwidth in the kernel-form error density

mutsizp

Initial step length of the random-walk Metropolis algorithm for sampling the bandwidth in the regression function. Its value will be updated at each iteration to achieve the optimal acceptance rate

errorsizp

Initial step length of the random-walk Metropolis algorithm for sampling the bandwidth in the kernel-form error density. Its value will be updated at each iteration to achieve the optimal acceptance rate

prior_alpha

Hyperparameter of the inverse gamma prior distribution for the squared bandwidths

prior_beta

Hyperparameter of the inverse gamma prior distribution for the squared bandwidths

err_int

Range of the error-density grid for computing the probability density function and cumulative probability density function

err_ngrid

Number of the error-density grid points

num_batch

Number of batches to assess the convergence of the MCMC

step

Thinning parameter. For example, when step=10, it keeps every 10th iteration of the MCMC output

alpha

The nominal coverage probability of the prediction interval, customarily 95 percent

...

Other arguments used to define semi-metric. For a set of smoothed functional data, the semi-metric based on derivative is suggested. For a set of rough functional data, the semi-metric based on the functional principal component analysis is suggested

Details

The Bayesian method estimates the bandwidths in the regression function and kernel-form error density in the context of semi-functional partial linear model with homoscedastic errors. It performs better than the functional cross validation in terms of estimation accuracy, since the latter one does not utilise the information about the unknown error density

Value

xpfinalres

Estimated bandwidths

mhat

Estimated regression function for the nonparametric part of the regression function

betahat

Estimated regression coefficient for the parametric part of the regression function

sif_value

Simulation inefficiency factor

mlikeres

Marginal likelihood calculated using the Chib's (1995) method

acceptnwMCMC

Acceptance rate for sampling bandwidth in the regression function

accepterroMCMC

Acceptance rate for sampling bandwidth in the kernel-form error density

fore.den.mkr

Estimated probability density function of the error

fore.cdf.mkr

Estimated cumulative density function of the error

point forecast

Predicted response

PI

Prediction interval of response

Note

It can be time-consuming when the sample size is large, say above 250

Author(s)

Han Lin Shang

References

H. L. Shang (2013) Bayesian bandwidth estimation for a semi-functional partial linear regression model with unknown error density, Computational Statistics, in press.

H. L. Shang (2013) Bayesian bandwidth estimation for a nonparametric functional regression model with unknown error density, Computational Statistics and Data Analysis, 67, 185-198.

X. Zhang and R. D. Brooks and M. L. King (2009) A Bayesian approach to bandwidth selection for multivariate kernel regression with an application to state-price density estimation, Journal of Econometrics, 153, 21-32.

F. Ferraty, I. Van Keilegom and P. Vieu (2010) On the validity of the bootstrap in non-parametric functional regression, Scandinavian Journal of Statistics, 37, 286-306.

R. Meyer and J. Yu (2000) BUGS for a Bayesian analysis of stochastic volatility models, Econometircs Journal, 3(2), 198-215.

S. Chib (1995) Marginal likelihood from the Gibbs output, Journal of the American Statistical Association, 90(432), 1313-1321.

See Also

bayMCMC_np_global, bayMCMC_np_local, bayMCMC_semi_local

Examples

1
2
3
4
5
htm = proc.time()
dum = bayMCMC_semi_global(data_x = simcurve_smooth_normerr, data_y = simresp_semi_normerr, 
	data_xnew = simcurve_smooth_normerr, Xvar = Xvar, warm = 50, M = 100, range.grid=c(0,pi), 
	q=2, nknot=20)
proc.time() - htm

bbefkr documentation built on May 2, 2019, 3:04 a.m.