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 |
np |
~~Describe |
keep |
~~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 | ##---- 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,np,keep){
lp<-length(par);cons<-rm.temp$cons;
if(is.null(rm.temp$y)){
if(lp>np){
warning("You gave more parameters than necessary
for a single-model fit. Only the first ",np," parameters were used.");
return(par[1:np]);
}
if(lp==np){return(par);}
if(lp==1){return(rep(par,np));}
}
if(lp==1){return(rep(par,2*np)[c(rep.int(T,np),cons)]);}
if(lp==np+sum(cons)){return(par);}
if(lp==np){return(c(par,par)[c(rep.int(T,np),cons)]);}
if(lp==2*np){return(par[c(rep.int(T,np),cons)]);}
if(lp==4){return(fixpar(c(par,par)[keep],np,keep));}
if(lp==8){return(fixpar(c(par)[keep],np,keep));}
stop("If starting parameters (par) are specified,
they should be a numerical vector equal in length either
to 4, or 8, or the number of parameters in your model, or
twice the number of parameters in your model, or the
total number of *unique* parameters in your model (i.e.
two starting values for each unconstrained parameter and
one starting value for each constrained one).");
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.