Displaying 4 results from an estimated 4 matches for "firm1".
Did you mean:
firm
2013 Apr 03
1
linear model coefficients by year and industry, fitted values, residuals, panel data
...ta is a panel (unbalanced and with gaps in years) of thousands of firms, by year and industry, and with financial information (variables X, Y, Z, for example), the number of firms by year and industry is not always equal, the number of years by industry is not always equal.
#reproducible example
firm1<-sort(rep(1:10,5),decreasing=F)
year1<-rep(2000:2004,10)
industry1<-rep(20,50)
X<-rnorm(50)
Y<-rnorm(50)
Z<-rnorm(50)
data1<-data.frame(firm1,year1,industry1,X,Y,Z)
data1
colnames(data1)<-c("firm","year","industry","X","Y",&q...
2013 Jun 07
4
matched samples, dataframe, panel data
...eparated samples with the same number os firms where
#one firm in the first have a corresponding firm in the second with the same
#year, industry and dimension (the dimension doesn't need to be exactly the
#same, it could vary in an interval of +/- 10%, for example)
#My reproducible example
firm1<-sort(rep(1:10,5),decreasing=F)
year1<-rep(2000:2004,10)
industry1<-rep(20,50)
dummy1<-c(0,0,1,1,0,0,1,1,0,1,1,1,0,0,0,0,0,0,1,1,1,1,0,0,0,0,0,0,0,0,1,0,1,0,1,1,1,1,1,0,0,1,0,0,0,0,0,1,1,1)
dimension1<-c(2120,345,2341,5678,10900,4890,2789,3412,9500,8765,4532,6593,12900,123,2345,3178,...
2005 Sep 05
4
Dummy variables model
Hi, all!
Anyone know an easy way to specify the following model.
Panel dataset, with stock through time, by firm.
I want to run a model of y on a bunch of explanatory variables, and one
dummy for each firm, which is 1 for observations that come from firm i,
and 0 everywhere else. I have over 200 firms (and a factor variable that
contains a firm identifier).
Any easy way of going about
2013 Feb 26
1
Light Libraries
...can be negative
panelid: an optional panel id
@DETAILS
None
@SEEALSO
leadseries, chgseries, pchgseries, compoundseries
@EXAMPLES
x <- rnorm(10)
xlag <- lagseries(x,2)
lm( x ~ xlag )
d <- data.frame( x <- c( rnorm(20), runif(30), rcauchy(40) ),
who= c( rep("firm1",20), rep("firm2", 30),
rep("firm3",40)),
year= c( 1961:1980, 1971:2000, 1971:2010 ) )
lagd <- data.frame( x=lagseries(d$x, panelid=who), who=d$who,
year=lagseries(d$x, panelid=who) )
',
test = '
all( lagseries( 1:6, 2, c(1,1,2,2,2,2) ) == c...