| projvar | R Documentation |
projvar uses the matrices from projdummies to project a variable.
In practice, all dependent and independent variables must be project for the two way regression
projvar(var, struc)
var |
A vector of a single variable |
struc |
The output of |
A list will be returned with the following named values: var - the projected variable delta, tau - intermediate variables
hhid <- c("a","b","c","a","b","c" ,"a","b","c" ,"a","b","c" ,"a","b","c")
tid <- c("1","1" ,"1" ,"2","2" ,"3","3","3" ,"4","4","5" ,"5","6","6" ,"6")
w <- rep(1, 15)
x1 <- rnorm(15, mean=50, sd=10)
struc <- projdummies(hhid, tid, w)
x1p <- projvar(x1, struc)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.