projvar: Project Variables

Description Usage Arguments Value Examples

View source: R/projvar.R

Description

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

Usage

1
projvar(var, struc)

Arguments

var

A vector of a single variable

struc

The output of projdummies, containing matrices necessary to project

Value

A list will be returned with the following named values: var - the projected variable delta, tau - intermediate variables

Examples

1
2
3
4
5
6
7
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)

xtreg2way documentation built on Aug. 11, 2020, 9:06 a.m.