Displaying 20 results from an estimated 61 matches for "getinitial".
2008 Aug 18
1
"nested" getInitial calls; variable scoping problems
...aframe.
The initial function for ssA uses eval(... parent.frame()) to find "A",
which is fine when called from .GlobalEnv. But when called from the initial
function of ssB it can't find (the modified version of) "A" .
If A is assigned as a parameter of the dataframe then getInitial.formula
returns "A" as initial estimates of "Coeff", so that doesn't work.
I've explored the evaluation frame parent-child structure created by the
nested getInitial calls, but it doesn't seem helpful, and I certainly
couldn't trust my understanding of it.
I...
2005 Oct 26
1
help with a self-starting function in nonlinear least squares regression.
...t;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 to act as a self-starting function.
The self-starting function seems to work (i.e. when I call "getInitial"
it provides the initial values), but I can't get it to work when used
within "nls". Here is an example:
1)
>
getInitial(Photosynthese~NRhyperbola(Irr,theta,Am,alpha,Rd),data=lit.dat
a[1:11,])
theta Am alpha Rd
0.5021546914 3.74...
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 what I'm doing wrong, I'd greatly appreciate it.
Details:
## Nonlinear model I want to fit to the data
const.PB...
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 first to address these issues,
but I haven't found clear guidance - I've read lost of relevant help pages,
but noth...
2011 Jun 17
2
Non-linear Regression best-fit line
...9999)
> tt<-c(0.0000000001,13,20,24,37,42,48,61,72,86,90)
> lm(log(0-log(yy))~tt)
Call:
lm(formula = log(0 - log(yy)) ~ tt)
Coefficients:
(Intercept) tt
9.5029 -0.3681
However, when I plug those values into the nls function, I get an error message about the "getInitial" method
> nlsout<-nls(y~1*exp(-beta*exp(-gamma*t),start=c(beta=exp(9.5),gamma=.368)));summary(nlsout)
Error in getInitial.default(func, data, mCall = as.list(match.call(func, :
no 'getInitial' method found for "function" objects
Can anyone help clarify how I can f...
2009 Jun 09
1
Non-linear regression/Quantile regression
...e
example there was with a SSlogis model. Trying to write
dat.nlrq <- nlrq(BM ~ I(Regen100^2), data=dat, tau=0.25, trace=TRUE)
or
dat.nlrq <- nlrq(BM ~ poly(Regen100^2), data=dat, tau=0.25, trace=TRUE)
(I don't know the difference) both gave me the following error message:
error in getInitial.default(func, data, mCall = as.list(match.call(func, :
no 'getInitial' method found for "function" objects
Looking in getInitial, it must have to do something with the starting
parameters or selfStart model. But I have no idea, what this is and how I
handle this problem. Can...
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.
Thanks,
Christelle
-------------------------------------------------------------
NetCourrier, votre bureau v...
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 ge...
2009 Nov 12
0
writing selfStart models that can deal with treatment effects
..."T0")];
value
}
SSexpDecayAndConstantInflow <- selfStart(expDecayAndConstantInflowModel,
expDecayAndConstantInflowModelInit, c("aL", "aN", "T0"))
Ignoring the treatment effects, the routines seem to work find:
-----------------------------------
> getInitial(Count ~ SSexpDecayAndConstantInflow(B0, Time, aL, aN, T0), data =
tissueData)
aL aN T0
4.600144e-02 1.000000e-04 1.082172e+03
> nls(Count ~ SSexpDecayAndConstantInflow(B0, Time, aL, aN, T0), data =
tissueData)
Nonlinear regression model
model: Count ~ SSexpDe...
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 in tapply(y, x, mean, na.rm = TRUE) :
arguments must have same length
Since I do not explicitly call tapply in my function that makes
NRhy...
2005 Apr 23
1
start values for nls() that don't yield singular gradients?
...on't result in singular gradients?
I have had no luck with the "selfStart" models, e.g., "SSgompertz"
-- the formula in "SSgompertz" is not the same as the one I need
above, since it has three parameters instead of four. I've tried
it and SSfpl thusly:
> getInitial(y ~ SSfpl(x,a,b,c,d),data=data.frame(x=x,y=y))
Error in nls(y ~ cbind(1, 1/(1 + exp((xmid - x)/exp(lscal)))), data =
xy, :
step factor 0.000488281 reduced below `minFactor' of 0.000976563
And this:
> getInitial(y ~ SSgompertz(x,a,b,c),data=data.frame(x=x,y=y))
Error in nls(y ~...
2009 Oct 22
1
Automatization of non-linear regression
...data1$time,
+ data1$severity,
+ xlab="Time",
+ ylab="Severity",
+ type="n"
+ )
> text(
+ data1$time,
+ data1$severity,
+ data1$plant
+ )
> title(main="Graph of severity vs time")
>
> getInitial(
+ severity ~ SSlogis(time, alpha, xmid, scale),
+ data = data1
+ )
alpha xmid scale
2.212468 12.506960 4.572391
>
>
> ## Using the initial parameters above,
> ## fit the data with a logistic curve.
> para0.st <- c(
+ alpha=2.212,
+...
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. s...
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 rout...
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 coefficients as mean of each batch
xy <- sor...
2008 Aug 04
0
Unexpected nls behaviour: Solved
...----------------------------------------------
"Keith Jewell" <k.jewell at campden.co.uk> wrote in message news:...
> 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)
> {
> # Estima...
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