Description Usage Arguments Value See Also Examples
View source: R/Functions_Cross_Dep.R
A routine that takes starting values and model specifications as in ncd_gen()
and returns
regression results.
1 |
startp |
vector of starting values |
... |
arguments to be passed to |
rvcov |
Logical. Should the variance-covariance matrix be returned? |
A list
coefs vector of coefficients
stde vector of standard errors
tstat vector of t-statistics
pval vector of p-values
varcov variance-covariance matrix if rvcov
is set to TRUE
Wstat a Wald chi-square statistic
pvwald Prob>Wstat
ncd_gen
1 2 3 4 5 6 7 8 9 10 11 | pars=c(1.0,0.5,0.8); N = 5; Tp = 6; fnp<- function(x,y,k){-(0.5*y^4+(x-y)^4)^.25} #dummy k
datpois=gdat_cd(pars=pars,N=N,Tp=Tp,seed=2,fun=fnp,eta = 200,modclass="poiscd") #poisson data
k=1; lp=k*(k+1)/2; startp = rep(0.2,(lp+2)) # fun() is known
zg1=RpacSPD::reg_cd(startp=startp,Y=datpois$Y,X=datpois$X,Xm=NULL,Xi=datpois$X,Tid=datpois$tpID,
Pid=datpois$psID,fun=fnp,k=k,nt=lp,utid=c(2:Tp),modclass="poiscd") #return function value
BIC(zg1) #compute BIC of fitted model
k=4; lp=k*(k+1)/2; startp = rep(0.2,(lp+2)) # fun() is polynomial approximated
zg4=RpacSPD::reg_cd(startp=startp,Y=datpois$Y,X=datpois$X,Xm=NULL,Xi=datpois$X,Tid=datpois$tpID,
Pid=datpois$psID,fun=polyexp,k=k,nt=lp,utid=c(2:Tp),modclass="poiscd") #return function value
BIC(zg4) #compute BIC of fitted model
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.