R/IVbs.R

Defines functions IVbs

IVbs<-function(Z,degree){ # Z is the matrix
  p <-dim(as.matrix(Z))[2]
  Z.bs<-NULL
  group<-c()
  for (j in 1:p) {
    Z.bs <-cbind(Z.bs,bs(Z[,j], degree))
    group<-c(group,rep(j,degree))
  }
  list(Z.bs=Z.bs,group=group)
}

Try the naivereg package in your browser

Any scripts or data that you put into this service are public.

naivereg documentation built on March 18, 2020, 5:09 p.m.