XWXd {mgcv}  R Documentation 
Routines for computing with discretized model matrices as described in Wood et al. (2017) and Li and Wood (2019).
XWXd(X,w,k,ks,ts,dt,v,qc,nthreads=1,drop=NULL,ar.stop=1,ar.row=1,ar.w=1, lt=NULL,rt=NULL) XWyd(X,w,y,k,ks,ts,dt,v,qc,drop=NULL,ar.stop=1,ar.row=1,ar.w=1,lt=NULL) Xbd(X,beta,k,ks,ts,dt,v,qc,drop=NULL,lt=NULL) diagXVXd(X,V,k,ks,ts,dt,v,qc,drop=NULL,nthreads=1,lt=NULL,rt=NULL)
X 
A list of the matrices containing the unique rows of model matrices for terms of a full model matrix, or the model matrices of the terms margins.
if term subsetting arguments 
w 
An nvector of weights 
y 
nvector of data. 
beta 
coefficient vector. 
k 
A matrix whose columns are index nvectors each selecting the rows of an X[[i]] required to create the full matrix. 
ks 
The ith term has index vectors 
ts 
The element of 
dt 
How many elements of 
v 

qc 
if 
nthreads 
number of threads to use 
drop 
list of columns of model matrix/parameters to drop 
ar.stop 
Negative to ignore. Otherwise sum rows 
ar.row 
extract these rows... 
ar.w 
weight by these weights, and sum up according to 
lt 
use only columns of X corresponding to these model matrix terms (for left hand 
rt 
as 
V 
Coefficient covariance matrix. 
These functions are really intended to be internal, but are exported so that they can be used in the initialization code of families without problem. They are primarily used by bam
to implement the methods given in the references. XWXd
produces X'WX, XWy
produces X'Wy, Xbd
produces Xb and diagXVXd produces the diagonal of XVX'.
The "lpip"
attribute of X
is a list of the coefficient indices for each term. Required if subsetting via lt
and rt
.
Simon N. Wood simon.wood@rproject.org
Wood, S.N., Li, Z., Shaddick, G. & Augustin N.H. (2017) Generalized additive models for gigadata: modelling the UK black smoke network daily data. Journal of the American Statistical Association. 112(519):11991210 http://dx.doi.org/10.1080/01621459.2016.1195744
Li, Z & S.N. Wood (2019) Faster model matrix crossproducts for large generalized linear models with discretized covariates. Statistics and Computing. https://doi.org/10.1007/s11222019098642