Description Usage Arguments Value See Also Examples
View source: R/Functions_Cross_Dep.R
Generate panel data with cross-sectional dependence for classes of models viz. Generate data for model with a single weight delta
1 2 |
pars |
vector of parameters to generate the data. |
N |
number of units in the panel |
Tp |
number of time periods |
ncXm |
number of other control variables to include |
seed |
seed for random number generation |
fun |
function that models cross-sectional dependence function φ(.,.) |
sder |
standard deviation for the error term. this option is applicable to the class "lmcd" |
eta |
additional parameter, like θ in the negative binomial class "nbcd" and seed for simulating the outcome for MLE methods. see c_out_dep |
modclass |
the class of model; see ncd_gen for models supported |
A data frame of Y,X,psID,tpID, where psID and tpID are unit and time IDs, Xm of ncXm columns if ncXm is specified
c_out_dep
1 2 3 4 5 | pars = c(1.0,0.5,0.8); pars2=pars = c(1.0,0.5,0.8,0.1,-0.1); N = 10; Tp = 16
fnp<- function(x,y) {-(0.5*y^4 + (x-y)^4)^.25} #poisson model
datpois = gdat_cd(pars=pars,N=N,Tp=Tp,seed=2,fun=fnp,eta = 200,modclass="poiscd")
datpois2 = gdat_cd(pars=pars2,N=N,Tp=Tp,ncXm=2,seed=2,fun=fnp,eta = 200,modclass="poiscd")
summary(datpois); summary(datpois2);#NA's in first period for Y due to lag
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.