search for: getinitializer

Displaying 20 results from an estimated 61 matches for "getinitializer".

Did you mean: setinitializer
2008 Aug 18
1
"nested" getInitial calls; variable scoping problems
Hi All, Another nls related problem (for background, I'm migrating a complicated modelling package from S-plus to R). Below I've reduced this to the minimum necessary to demonstrate my problem (I think); the real situation is more complicated. Two similar selfStart functions, ssA and ssB. The 'initial' function for ssB modifies its arguments a little and then calls getInital
2005 Oct 26
1
help with a self-starting function in nonlinear least squares regression.
Hello. I am having a problem setting up a self-starting function for use in nonlinear regression (and eventually in the mixed model version). The function is a non-rectangular hyperbola - called "NRhyperbola" - which is used for fitting leaf photosynthetic rate to light intensity. It has one independent variable (Irr) and four parameters (theta, Am, alpha and Rd). I have created this
2009 Oct 17
1
custom selfStart model works with getInitial but not nls
Hello, I'm having problems creating and using a selfStart model with nlme. Briefly, I've defined the model, a selfStart object, and then combined them to make a selfStart.default model. If I apply getInitial to the selfStart model, I get results. However, if I try usint it with nls or nlsList, these routines complain about a lack of initial conditions. If someone could point out
2008 Sep 26
0
The 'data' argument and scoping in nls
Hi Everyone, I seek guidance to avoid wasting a lot of time and doing things badly. Several times I've solved my problems, only to find that my solutions were clumsy and not robust. (see "nested" getInitial calls; variable scoping problems: Solved?? http://finzi.psych.upenn.edu/R/Rhelp02a/archive/139943.html for one truly horrible approach). I'm sure that I'm not the
2011 Jun 17
2
Non-linear Regression best-fit line
I am trying to fit a curve to a cumulative mortality curve (logistic) where y is the cumulative proportion of mortalities, and t is the time in hours (see below). Asym. at 0 and 1 > y [1] 0.00000000 0.04853859 0.08303777 0.15201970 0.40995074 0.46444992 0.62862069 0.95885057 1.00000000 [10] 1.00000000 1.00000000 > t [1] 0 13 20 24 37 42 48 61 72 86 90 I tried to find starting values for
2009 Jun 09
1
Non-linear regression/Quantile regression
Hi, I'm relatively new to R and need to do a quantile regression. Linear quantile regression works, but for my data I need some quadratic function. So I guess, I have to use a nonlinear quantile regression. I tried the example on the help page for nlrq with my data and it worked. But the example there was with a SSlogis model. Trying to write dat.nlrq <- nlrq(BM ~ I(Regen100^2),
2002 May 02
2
a question
Hi, I have a program written in R which is good on the version 1.2, but for the fallowing versions of R, an error always is at the same place. That is at the level of the fallowing line: Sur<- getInitial(res2[m:M,2]~SSasymp(res2[m:M,1],Asymp,resp0,lrc),data=res2) Error in eval(expr,envir,enclos):numeric envir arg not of length one I don't know at all this langage for the instant.
2015 May 18
2
[LLVMdev] copy value of a global's data field to another global
getInitializer returns the complete initializer of the global. My globals are complex nested structs, from which I want to extract e.g. one double datafield. Example: >From a struct Stuct having double,array(3xint),float fields, I could extract the second int value using the index sequence 0,1,1 with getGet...
2009 Nov 12
0
writing selfStart models that can deal with treatment effects
Hello, I'm trying to do some non-linear regression with 2 cell types and 4 tissue type treatments using selfStart models Following Ritz and Streibig (2009), I wrote the following routines: ##Selfstart expDecayAndConstantInflowModel <- function(Tb0, time, aL, aN, T0){ exp(-time*aL)*(T0*aL+(-1+exp(time * aL))*Tb0 * aN)/aL } expDecayAndConstantInflowModelInit <- function(mCall, LHS,
2005 Sep 01
1
making self-starting function for nls
Hello. Following pages 342-347 of Pinheiro & Bates, I am trying to write a self-starting nonlinear function (a non-rectagular hyperbola) to be used in nonlinear least squares regression (and eventually for a mixed model). When I use the getInitial function for my self-starting function I get the following error message: > getInitial(photo~NRhyperbola(Irr,theta,Am,alpha,Rd),dat) Error
2005 Apr 23
1
start values for nls() that don't yield singular gradients?
I'm trying to fit a Gompertz sigmoid as follows: x <- c(15, 16, 17, 18, 19) # arbitrary example data here; y <- c(0.1, 1.8, 2.2, 2.6, 2.9) # actual data is similar gm <- nls(y ~ a+b*exp(-exp(-c*(x-d))), start=c(a=?, b=?, c=?, d=?)) I have been unable to properly set the starting value '?'s. All of my guesses yield either a "singular gradient" error if they
2009 Oct 22
1
Automatization of non-linear regression
Hi everybody, I'm using the method described here to make a linear regression: http://www.apsnet.org/education/advancedplantpath/topics/Rmodules/Doc1/05_Nonlinear_regression.html > ## Input the data that include the variables time, plant ID, and severity > time <- c(seq(0,10),seq(0,10),seq(0,10)) > plant <- c(rep(1,11),rep(2,11),rep(3,11)) > > ## Severity
2004 Oct 10
1
[LLVMdev] Re: Hide visible string in variable
...his case. sorry, I still don't understand the way you mentioned. Would you mind giving me a example? What I have tried is that I used the following code for(Module::ginterator gI=M->gbegin(), gE=M->gbegin; gI!=gE;++gI){ std::cout<< *gI<< gI->getName()<<gI->getInitializer(); } With *gI, I could get all string With gI->getName, I could get the global variable name. With gI->getInitializer(), I could get the init value for the GV. Next, what I want to do is to modify the value of the GV, and I tried to use setInitializer(), but I don't know to do it. setIn...
2005 Jan 31
1
[LLVMdev] Question about Global Variable
Hi, Sorry for bothering you guys again. I got problem when I am trying to recover the Global Variable Initial value. What I did is like the following ConstantArray *Cstr = dyn_cast<ConstantArray>(gI->getInitializer()); // the above instruction enable me to get the content of initial string of global variable, like char a[10] ="test global"; And then I make some change for the Cstr and write it back to the global variable by gI->setInitializer(Constant *); Meanwhile I am trying to put a routine...
2004 Oct 19
1
[LLVMdev] Re:question about Insert callInst to call a function in library
...y(F.getParent()); DecodeString(F.getParent()); return true; } void DecodeStr::get_randKey(Module *M){ for(Module::giterator gI=M->gbegin(),gE=M->gend();gI!=gE;++gI){ std::string GVname = gI->getName(); if(strcmp(GVname.c_str(),"Gvkey")==0){ randKey =(gI->getInitializer()); } } } void DecodeStr::DecodeString(Module *M){ std::cerr<<"filename "<<M->getModuleIdentifier()<<endl; for(Module::giterator gI = M->gbegin(),gE=M->gend();gI!=gE;++gI){ unsigned i=0; if(ConstantArray *Cstr = dyn_cast<ConstantArray>(g...
2008 Aug 01
0
Unexpected nls behaviour
Hi everyone, I thought that for a selfStart function, these two should be exactly equivalent > nls(Aform, DF) > nls(Aform, DF, start=getInitial(Aform, DF)) but in this example that is not the case in R (although it is in S-plus V6.2) ------------------------------ SSbatch<-selfStart( model=function(Batch, Coeffs) { Coeffs[Batch] } ,initial=function(mCall, data, LHS) { # Estimate
2008 Aug 04
0
Unexpected nls behaviour: Solved
Hi Everyone, I'd omitted the non-optional 'parameters' argument to selfStart. Making this change to SSbatch gives the same (successful) result from the two calls to nls. SSbatch<-selfStart( model=function(Batch, Coeffs) { Coeffs[Batch] } ,initial=function(mCall, data, LHS) { # Estimate coefficients as mean of each batch xy <- sortedXyData(mCall[["Batch"]],
2018 Mar 21
1
How to read String value of GlobalVariable?
Hi I have IR Code like ... @path = private constant [6xi8] c"abcde\00" ... --- Code from Pass --- GlobalVariable * GVPath = .... // contains @path I want to convert "abcde" to StringRef. Can you help me with GlobalVariable API? GlobalVariable::getInitializer() --> Constant* // How to get exact value äbcde from here? ~mahesh -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20180321/fc70ed6d/attachment.html>
2015 May 27
2
[LLVMdev] convert GetElemtPtr result to pointer on element?
Hi Tim, I forgot to say that I try to do all this in the LLVM API, not IR. I read in a bc'ed program and try to edit it using the API. Alex Tim Northover wrote: >> But I can not succeed in using the getGetElementPtr result in >> constructing an initalizer for another global value (which expects a >> ConstantFP* and not a ConstantExpr*). > > The result of a
2015 May 17
2
[LLVMdev] copy value of a global's data field to another global
Hi all, I can get access to the data stored in globals as follows: GlobalVariable* pGvarAct=_set_a_valid_global_; const_ptr_indicesVec=_the_indexes_ llvm::Constant* pConst; pConst=ConstantExpr::getGetElementPtr(pGvarAct, const_ptr_indicesVec); and e.g. use this to repalece an argumrnt of an instruction like: I->setOperand(someArgumentIndex,pConst); However, getGetElementPtr returns a