Description Usage Arguments Details Value Examples
This is an internal function of package ggam
.
1 |
UB |
The univariate basis function matrix constructed. |
B |
The bernstein basis matrix. |
Q2 |
The |
K |
The energy matrix. |
lam1 |
The smoothing penalty parameter. |
lam2 |
The variable selection penalty parameter. |
Z |
The parametric matrix. |
Y |
Response variable. |
ind.c |
The indexed for parametric coefficient for which standard error want to be calculated. |
VS |
variable section is conducted or not. |
... |
other arguments. |
A sandwich formula is developed to find the standard error for β. The detailed algorithm is in the paper Wang et al. (2018).
se_beta |
The standard error of linear coefficients. |
Ve |
The estimated covariance matrix. |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | library(MASS)
library(grpreg)
library(Matrix)
library(BPST)
data("eg1pop_dat")
eg1_V1=eg1pop_dat[['V1']]
eg1_T1=eg1pop_dat[['T1']]
eg1pop_rho03=eg1pop_dat[['rho03']]
sam=eg1pop_rho03[sample(1:dim(eg1pop_rho03)[1],100),]
B0=basis(eg1_V1,eg1_T1, d=2, r=1, sam[,3:4])
B=B0$B
ind=B0$Ind.inside
Q2=B0$Q2
K=B0$K
Z=sam[ind,c(5:12)]
Y=sam[ind,'Y']
lam1=0.1
lam2=0
beta_se(UB=NULL,as.matrix(B),Q2,K,lam1,lam2,Z,Y,ind.c=1:6)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.