plsim.npTest | R Documentation |
Study the hypothesis test:
H_0:η(u) = θ_0+θ_1u \ \mbox{ versus }\quad H_1:\ η(u)\ne θ_0 + θ_1u \ \mbox{for \ some \ } u
where θ_0 and θ_1 are unknown constant parameters.
plsim.npTest(fit)
fit |
the result of function plsim.est or plsim.vs.soft. |
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 |
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.
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.