Learn R Programming

PLSiMCpp (version 1.0.4)

plsim.npTest: Testing nonparametric component

Description

Study the hypothesis test: $$H_0:\eta(u) = \theta_0+\theta_1u \ \mbox{ versus }\quad H_1:\ \eta(u)\ne \theta_0 + \theta_1u \ \mbox{for \ some \ } u $$ where \(\theta_0\) and \(\theta_1\) are unknown constant parameters.

Usage

plsim.npTest(fit)

Value

A list with class "htest" containing the following components

statistic

the value of the test statistic.

p.value

the p-value for the test

method

a character string indicating what type of test was performed

data.name

a character string giving the name of input

Arguments

fit

the result of function plsim.est or plsim.vs.soft.

References

H. Liang, X. Liu, R. Li, C. L. Tsai. Estimation and testing for partially linear single-index models. Annals of statistics, 2010, 38(6): 3811.

Examples

Run this code

n = 50
sigma = 0.1

alpha = matrix(1,2,1)
alpha = alpha/norm(alpha,"2")

beta = matrix(4,1,1)

x = matrix(1,n,1)

z = matrix(runif(n*2),n,2)

y = 4*((z%*%alpha-1/sqrt(2))^2) + x%*%beta + sigma*matrix(rnorm(n),n,1)

# Obtain parameters in PLSiM using Profile Least Squares Estimator
fit_plsimest = plsim.est(x, z, y)

res_npTest_plsimest = plsim.npTest(fit_plsimest)

# Obtain parameters in PLSiM using Penalized Profile Least Squares Estimator
# with lambda set as 0.01
fit_plsim = plsim.vs.soft(x,z,y,lambda = 0.01)

res_npTest_plsim = plsim.npTest(fit_plsim)

Run the code above in your browser using DataLab