search for: langensk

Displaying 2 results from an estimated 2 matches for "langensk".

Did you mean: landesk
2003 Apr 21
3
To create a Panel and run a Pooled OLS
Dear all, I have tried to merge two cross sections (crossA and crossB) as follows, both crossA and crossB include the same variables, e.g., ID,y,x1,x2: Panel <- merge(crossA,crossB,by="ID") I have, thereafter, tried to run the following pooled OLS: OLS <- lm(Panel$y~Panel$x1+Panel$x2) and have received the following error message "Error in model.frame(formula, rownames,
2003 May 02
3
Creating Dummy Variables with if else phrase
Dear All, I want to do 52 state dummy variables. In order to make it easier for me, I thought of using the below commands. (x is the vector with state variables, matrix will correspond to the dummy variables) x <- c(1,2,NA,4) matrix <- matrix(0,nrow=4,ncol=4) for (i in 1:4) { if (is.real(x[i])) { matrix[i,x[i]] <- 1 } else { matrix[i,] <- rep(NA,4) } } This gives me the