Hi all
I want to use plm function on splitted dataset but facing problems while
doing it.
I did the same for lm function it worked fine but now my problem forces me
to use lags into it while in a single set I have multiple type of data,
which I believe can only be done with panel data.
The code I am using is
A = split(mydata, mydata$Unique.ID.Number)
Z = lapply(A, function(df){plm(Total.Sales ~ Purchase.Score, data = df)})
It is showing this error
Error in eval(expr, envir, enclos) : object 'Total.Sales' not found
This works when we try
Z = lapply(A, function(df){lm(Total.Sales ~ Purchase.Score, data = df)})
Thanks in advance
--
View this message in context:
http://r.789695.n4.nabble.com/Plm-on-splitted-data-tp4637610.html
Sent from the R help mailing list archive at Nabble.com.
______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.