- X=as.double(X), Y=as.double(Y), M=as.double(Moments(θ)),
- pn=as.integer(n), pd=as.integer(d),
+ X=as.double(X), Y=Y, M=Moments(θ), pn=as.integer(n), pd=as.integer(d),
W=as.double(W), PACKAGE="morpheus")$W, nrow=dd, ncol=dd ) )
NULL #avoid returning W
},
W=as.double(W), PACKAGE="morpheus")$W, nrow=dd, ncol=dd ) )
NULL #avoid returning W
},
res <- cbind(res, rbind(
sweep(as.matrix(β [,km1]), 2, G1[km1], '*') - G1[K] * β [,K],
sweep(as.matrix(β2[,km1]), 2, G2[km1], '*') - G2[K] * β2[,K],
sweep(as.matrix(β3[,km1]), 2, G3[km1], '*') - G3[K] * β3[,K] ))
res <- cbind(res, rbind(
sweep(as.matrix(β [,km1]), 2, G1[km1], '*') - G1[K] * β [,K],
sweep(as.matrix(β2[,km1]), 2, G2[km1], '*') - G2[K] * β2[,K],
sweep(as.matrix(β3[,km1]), 2, G3[km1], '*') - G3[K] * β3[,K] ))