objf: ~~function to do ... ~~

Description Usage Arguments Details Value Note Author(s) References See Also Examples

Description

~~ A concise (1-5 lines) description of what the function does. ~~

Usage

1
objf(par, lb = 0, ub = 1, cons = rep.int(1, 4), x, y = NULL, keep = 1:2, np = 2, ex = exg)

Arguments

par

~~Describe par here~~

lb

~~Describe lb here~~

ub

~~Describe ub here~~

cons

~~Describe cons here~~

x

~~Describe x here~~

y

~~Describe y here~~

keep

~~Describe keep here~~

np

~~Describe np here~~

ex

~~Describe ex here~~

Details

~~ If necessary, more details than the description above ~~

Value

~Describe the value returned If it is a LIST, use

comp1

Description of 'comp1'

comp2

Description of 'comp2'

...

Note

~~further notes~~

~Make other sections like Warning with Warning .... ~

Author(s)

~~who you are~~

References

~put references to the literature/web site here ~

See Also

~~objects to See Also as help, ~~~

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
##---- 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,lb=0,ub=1,cons=rep.int(1,4),x,y=NULL,keep=1:2,np=2,ex=exg){
	if(max(par<=lb)!=0|max(par>=ub)!=0){return(NA);}
	par1<-par2<-rep.int(NA,4); par1[keep]<-par2[keep]<-par[1:np];
	par2[keep][cons[keep]>0]<-par[(np+1):length(par)];
	env1<-list(a=par1[1],b=par1[2],c=par1[3],s=par1[4],x=x); 
	env2<-list(a=par2[1],b=par2[2],c=par2[3],s=par2[4],x=y);
	out<-sum(eval(ex,envir=env1))+sum(eval(ex,envir=env2));
	if(!is.na(out) & is.finite(out) & out < -50){return(out);}else{return(NA);}
  }

Survomatic documentation built on May 2, 2019, 4:09 p.m.

Related to objf in Survomatic...