I estimate the following model for estimating the standard errors for random coefficients:
library(nlme)
library(foreign)
Sample_Data <- read.dta (file="Sample_Data.dta")
Sample_Data <- within(Sample_Data, {
industry <- factor(industry)
id <- factor(id)
year <- factor(year)})
Model1 <- lme(MRPK ~ 1+age+empl+net_worth+input_growth+TFPR_shock, random = (~1+net_worth|industry/id), data=Sample_Data, control=lmeControl(opt='optim'), method="REML")
My sample data on the following link:
https://dl.dropboxusercontent.com/u/99295510/Sample_Data.dta
I am getting the following error:
Error in solve.default(pdMatrix(a, factor = TRUE)) :
Lapack routine dgesv: system is exactly singular: U[1,1] = 0
How could we solve this problem?