fit.pfc(X, y, r=4, d=NULL, F.user=NULL, weight.type=c("sample", "diag", "L1"),
lam.vec=NULL, kfold=5, silent=TRUE, qrtol=1e-10, cov.tol=1e-4,
cov.maxit=1e3, NPERM=1e3, level=0.01)F.user=NULL), r is the polynomial
order, i.e,
$f(y) = (y, y^2, \ldots, y^r)'$. The default is r=4. This argument is not used
when F.userweight.type="L1".
If unspecified by the user this function will use the sequential permutation testing procedure, described in Section 8.2
of Cook, X on $f$(Y) with $n-r-1$ scaling.
There are three options for $\wweight.type="L1". If this vector has more than one entry,
then kfold cross validation will be performed to select the optimal tuning parameter value.weight.type="L1".
Only used if lam.vec has more than one entry.silent=FALSE, progress updates are printed.qr.solve().weight.type="L1".weight.type="L1".d is unspecified.weight.type="L1", will be NULL otherwise.weight.type="L1", will be NULL otherwise.lam.vec.
Will be NULL unless weight.type="L1" and lam.vec has more than one entry.NULL
unless d is unspecified.Cho-Jui Hsieh, Matyas A. Sustik, Inderjit S. Dhillon, and Pradeep Ravikumar (2011). Sparse inverse covariance matrix estimation using quadratic approximation. Advances in Neural Information Processing Systems 24, 2011, p. 2330--2338.
pred.responseset.seed(1)
n=20
p=30
d=2
y=sqrt(12)*runif(n)
Gam=matrix(rnorm(p*d), nrow=p, ncol=d)
beta=diag(2)
E=matrix(0.5*rnorm(n*p), nrow=n, ncol=p)
V=matrix(c(1, sqrt(12), sqrt(12), 12.8), nrow=2, ncol=2)
tmp=eigen(V, symmetric=TRUE)
V.msqrt=tcrossprod(tmp$vec*rep(tmp$val^(-0.5), each=2), tmp$vec)
Fyc=cbind(y-sqrt(3),y^2-4)%*%V.msqrt
X=0+Fyc%*%t(beta)%*%t(Gam) + E
fit=fit.pfc(X=X, y=y, r=3, weight.type="sample")
## display hypothesis testing information for selecting d
fit$test.info
## make a response versus fitted values plot
plot(pred.response(fit), y)Run the code above in your browser using DataLab