Description Usage Arguments Details Value Note Author(s) References See Also Examples
~~ A concise (1-5 lines) description of what the function does. ~~
1 |
par |
~~Describe |
cons |
~~Describe |
x |
~~Describe |
y |
~~Describe |
~~ If necessary, more details than the description above ~~
~Describe the value returned If it is a LIST, use
comp1 |
Description of 'comp1' |
comp2 |
Description of 'comp2' |
...
~~further notes~~
~Make other sections like Warning with Warning .... ~
~~who you are~~
~put references to the literature/web site here ~
~~objects to See Also as help
, ~~~
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 | ##---- Should be DIRECTLY executable !! ----
##-- ==> Define data, use random,
##-- or do help(data=index) for the standard data sets.
## The function is currently defined as
function(par,cons=NULL,x=NULL,y=NULL){
if(is.null(cons)) cons<-rm.temp$cons;
if(is.null(x)) { x<-rm.temp$x; y<-rm.temp$y; }
par2<-par[1:3]; par2[cons>0]<-par[4:length(par)];
env1<-list(a=par[1],b=par[2],c=par[3],x=rm.temp$x);
env2<-list(a=par2[1],b=par2[2],c=par2[3],x=rm.temp$y);
out1a<-c(sum(eval(D(D(exgm,'a'),'a'),envir=env1)),
sum(eval(D(D(exgm,'b'),'a'),envir=env1)),
sum(eval(D(D(exgm,'c'),'a'),envir=env1)));
out1b<-c(sum(eval(D(D(exgm,'a'),'b'),envir=env1)),
sum(eval(D(D(exgm,'b'),'b'),envir=env1)),
sum(eval(D(D(exgm,'c'),'b'),envir=env1)));
out1c<-c(sum(eval(D(D(exgm,'a'),'c'),envir=env1)),
sum(eval(D(D(exgm,'b'),'c'),envir=env1)),
sum(eval(D(D(exgm,'c'),'c'),envir=env1)));
out1<-rbind(out1a,out1b,out1c);
out1<-rbind(cbind(out1,out1),cbind(out1,out1));
out2a<-c(sum(eval(D(D(exgm,'a'),'a'),envir=env2)),
sum(eval(D(D(exgm,'b'),'a'),envir=env2)),
sum(eval(D(D(exgm,'c'),'a'),envir=env2)));
out2b<-c(sum(eval(D(D(exgm,'a'),'b'),envir=env2)),
sum(eval(D(D(exgm,'b'),'b'),envir=env2)),
sum(eval(D(D(exgm,'c'),'b'),envir=env2)));
out2c<-c(sum(eval(D(D(exgm,'a'),'c'),envir=env2)),
sum(eval(D(D(exgm,'b'),'c'),envir=env2)),
sum(eval(D(D(exgm,'c'),'c'),envir=env2)));
out2<-rbind(out2a,out2b,out2c);
out2<-rbind(cbind(out2,out2),cbind(out2,out2));
id1<-c(1,1,1,1-cons); id2<-c(1-cons,1,1,1);
id1<-id1%o%id1; id2<-id2%o%id2;
out<-out1*id1+out2*id2;
if(rm.temp$debug){print("hessian:");print(out);}
out[c(1:3,4:6*cons),c(1:3,4:6*cons)];
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.