search for: b0

Displaying 20 results from an estimated 1034 matches for "b0".

2003 May 21
1
callNextMethod
Hi, I don't understand why this code doesn't work (f(b2)): ///////////////// setClass("B0", representation(b0 = "numeric")) setClass("B1", representation("B0", b1 = "character")) setClass("B2", representation("B1", b2 = "logical")) f <- function(x) class(x) setMethod("f", "B0", function(x...
2011 Dec 20
1
constrOptim and problem with derivative
Dear List, I am using constrOptim to solve the following fr1 <- function(x) { b0 <- x[1] b1 <- x[2] ((1/(1+exp(-b0+b1))+(1/(1+exp(-b0)))+(1/(1+exp(-b0-b1)))))/3 } As you can see, my objective function is ((1/(1+exp(-b0+b1))+(1/(1+exp(-b0)))+(1/(1+exp(-b0-b1)))))/3 and I would like to solve for both b0 and b1. If I were to use optim then I would derive the gradie...
2011 Dec 09
1
'callNextMethod' in a '[<-' function does not work ?
Hi the list, I try to use callNextMethod in a setteur ([<-) but it does not work. Any raison ? Any other option ? --- 8< ------------------ ### Class B0 ### setClass("B0" , representation(b0 = "numeric")) setReplaceMethod("[","B0",function(x,i,j,value){x at b0 <- -value}) a <- new("B0") a at b0 <- 3 a a["b0"] <- 3 a ### Class B1 ### setClass("B1", representation(b1...
2011 Dec 21
1
constrOptim and further arguments
Dear List, I have the code below, where I am using the constrained optimisation package, 'constrOptim.nl' to find the values of two values, b0 and b1. I have no problems when I enter further variable information DIRECTLY into the functions, fn, and heq. In this instance I require fn to have -0.0075 appended to it, and in the case of heq, h[1] has -0.2. library(alabama) fn<-function(x) (((1/(1+exp(-x[1]+x[2]))+(1/(1+exp(-x[1])))+(1/...
2005 Nov 29
2
cheb_poly_eva using Clenshaw's recurrence formula
...ol. 34, No. 6, December 1986, I rewrite the function cheb_poly_eva in lsp.c using the Clenshaw's recurrence formula, as described, for example, in Numerical Recipes in C, Second Edition (5.5 and 5.8) : static float cheb_poly_eva(spx_word32_t *coef, float x, int m, char *stack) { int k; float b0, b1, tmp; int m2=m>>1; /* Initial conditions */ b0=0; /* b_(m+1) */ b1=0; /* b_(m+2) */ x*=2; /* Calculate the b_(k) */ for(k=m2;k>0;k--) { tmp=b0; /* tmp holds the previous value of b0 */ b0=x*b0-b1+coef[m2-k]; /* b0 holds its new value base...
2009 Feb 19
2
bugfix for nls with port algorithm (PR#13540)
...nger object length is not a multiple of shorter object length" This error can be fixed by changing line 423 in nls.R from: if(any(start < low || start > upp)) { to: if(any(unlist(start) < low || unlist(start) > upp)) { The following code will generate the error: x = runif(200) b0 = c(rep(0,100),runif(100)) b1 = 1 fac <- as.factor(rep(c(0,1), each=100)) y = b0+b1*x+rnorm(200,sd=0.05) nls(y~b0[fac]+b1*x, start=list(b0=c(1,1),b1=1), algorithm="port", upper=c(100,100,100)) Manuel
2010 Jul 09
2
eval and assign in loop problem
deaR useRs, I am trying to assign different values to different objects in a for loop. The following is a toy example of the part that has been giving me a hard time. The first "for loop" generates four objects, b0, b1, b2, b3 with random numbers. And, the second "for loop" is equivalent to b1 = b0 b2 = b1 b3 = b2 b4 = b3 But, when I run this code, the result is equivalent to b1 = b0 b2 = b0 b3 = b0 b4 = b0 So, the increment does not seem to be properly working for the second part of the "ass...
2003 Jun 17
5
How to make a customized, unattended install for FreeBSD?
I would like to customize our store-bought, bootable FreeBSD CD so that it does a non-interactive (or minimally interactive ;-) install. The interim solution we've devised has our lab execution techs booting from a CD and then using the Sysinstall "Load config file" menu option to load an "install.cfg" file from a floppy. We'd like to eliminate this step by
2005 Jul 13
1
Fieller's Conf Limits and EC50's
...upon Fieller's thm. # modified version of EC50.calc found in P&B Fig 7.22 # now allows other link functions, using the calculations # found in dose.p (MASS) # SBC 19 May 05 call <- match.call() coef = coef(obj) vcov = summary.glm(obj)$cov.unscaled b0<-coef[1] b1<-coef[2] var.b0<-vcov[1,1] var.b1<-vcov[2,2] cov.b0.b1<-vcov[1,2] alpha<-1-conf.level zalpha.2 <- -qnorm(alpha/2) gamma <- zalpha.2^2 * var.b1 / (b1^2) eta = family(obj)$linkfun(p) #based on...
2011 Feb 24
2
MCMCpack combining chains
Deal all, as MCMClogit does not allow for the specification of several chains, I have run my model 3 times with different random number seeds and differently dispersed multivariate normal priors. For example: res1 = MCMClogit(y~x,b0=0,B0=0.001,data=mydat, burnin=500, mcmc=5500, seed=1234, thin=5) res2 = MCMClogit(y~x,b0=1,B0=0.01,data=mydat, burnin=500, mcmc=5500, seed=5678, thin=5) res3 = MCMClogit(y~x,b0=5,B0=0.0001,data=mydat, burnin=500, mcmc=5500, seed=91011, thin=5) Each result produces an object of class mcmc. In order...
2009 Oct 17
1
custom selfStart model works with getInitial but not nls
...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.PBMC.tcell.model <- function(B0, t, aL, aN, T0){ Tb0 = B0; x = exp(-log(aL) + log(T0*aL+(-1+exp(t * aL))*Tb0 * aN) - t * aL); return(x); } ##Define selfStart routine const.PBMC.tcell.selfStart<- function(mCall, LHS, data){ t0 = 0; t1 = 24; t2 = 48; ##Get B0 Value B0 = data[1, "B0"];...
2006 Apr 23
2
distribution of the product of two correlated normal
Hi, Does anyone know what the distribution for the product of two correlated normal? Say I have X~N(a, \sigma1^2) and Y~N(b, \sigma2^2), and the \rou(X,Y) is not equal to 0, I want to know the pdf or cdf of XY. Thanks a lot in advance. yu [[alternative HTML version deleted]]
2010 Jan 21
1
Retrieving an evaluated gradient value (UNCLASSIFIED)
Classification: UNCLASSIFIED Caveats: NONE Dear R users, How can I retrieve an evaluated gradient value from "deriv" function provided below? I want to retrieve b0 value. Appreciate your help. Kyong junk1<-deriv(~(1/b1)*k-b0/b1,"b0",c("k","b0","b1"),formal=T) junk1(k=0,b0=-14.0236,b1=2.44031) [1] 5.746647 attr(, "gradient"): b0 [1,] -0.409784 Classification: UNCLASSIFIED Caveats: NONE...
2008 Jun 05
1
nls() newbie convergence problem
I'm sure this must be a nls() newbie question, but I'm stumped. I'm trying to do the example from Draper and Yang (1997). They give this snippet of S-Plus code: Specify the weight function: weight < - function(y,x1,x2,b0,b1,b2) { pred <- b0+b1*x1 + b2*x2 parms <- abs(b1*b2)^(1/3) (y-pred)/parms } Fit the model gmfit < -nls(~weight(y,x1,x2,b0,b1,b2), observe,list("starting value")) in converting this to R, I left the weight function alone and replaced the nls() with gmfit <- nls(~weight(y,x...
2010 Oct 31
2
transfer string to expression
Dear all: when I use parse() there is some problems. Below is an example: b0<-1 b1<-1 x<-1 str2expr<-function(x){eval(parse(text=x))} test1<-"b0+b1*sqrt(x)" test2<-"b0+b1" str2expr(test1) str2expr(test2) it can work well for test2 but not for test1. Could you tell me how to fix this problem or is there other more stable method to tran...
2015 Sep 02
3
sieve filtering utf 8 strings
...39;t have errors compiling the script or executing it via LMTP, but it doesn't work. Normally user receives messages from robot with subject encoded as quoted-printable Subject: =?UTF-8?Q?LDS_(robot):_=D0=9B=D0=B8=D1=81=D1=82?= =?UTF-8?Q?_=D0=B1=D1=80=D0=BE=D0=BD=D0=B8=D1=80=D0=BE=D0=B2=D0=B0=D0=BD?= =?UTF-8?Q?=D0=B8=D1=8F__=D0=BE=D1=82=D0=BF=D1=80=D0=B0=D0=B2=D0=BB=D0=B5?= When I send a test message via Thunderbird with required words - sieve works fine and subject is encoded in base64 Subject: =?UTF-8?B?0JvQuNGB0YIg0LHRgNC+0L3QuNGA0L7QstCw0L3QuNGPINC+0YLQv9GA?= =?UTF-8?B?0LDQs...
2011 Dec 19
1
None-linear equality constrained optimisation problems
Dear R users, I have a problem. I would like to solve the following: I have pL = 1/(1+e^(-b0+b1)) pM = 1/(1+e^(-b0)) pH = 1/(1+e^(-b0-b1)) My target function is TF= mean(pL,pM,pH) which must equal 0.5% My non-linear constraint is nl.Const = 1-(pM/pH), which must equal 20%, and would like the values of both b0 and b1 where these conditions are met. I have searched widely for an answe...
2009 Aug 17
1
WINE doesn't work after kernel upgrade
...ither 1.1.27 (development), nor 1.0.1 (stable). It can't open object files -- there are no such object files. $ winecfg err:module:load_builtin_dll failed to load .so lib for builtin L"winex11.drv": libuuid.so.1: =52>7<>6=> >B:@KBL @0745;O5<K9 >1J5:B=K9 D09;: 5B B0:>3> D09;0 8;8 :0B0;>30 err:module:load_builtin_dll failed to load .so lib for builtin L"winex11.drv": libuuid.so.1: =52>7<>6=> >B:@KBL @0745;O5<K9 >1J5:B=K9 D09;: 5B B0:>3> D09;0 8;8 :0...
2011 Mar 11
2
[LLVMdev] Unnamed temporaries
Hi, I hope this is the right place to ask it, sorry if I'm wrong... My compiler is generating this code: (line numbers included) (Please ignore the extra br label %b0 and the whole b0) ... 54 define i32 @std_lang__rest() { 55 entry: 56 %ret = alloca i32 ; <i32*> int* 57 %0 = icmp eq i32 4, 5 ; <i1> boolean 58 br i1 %0, label %b0_t, label %b0_f 59 b0_t: 60 %1 = add i32...
2006 Jul 25
1
HELP with NLME
...t error setting with some validation data (indicated by vs.flag). Any help would be greatly appreciated.I apologize for the clumsiness of the R code. Many thanks in advance. Sincerely, Loki ################################################################# SAS Code: proc nlmixed data=repdat parms b0 -3 b1 -.135 a0 3 a1 4 sigsq 0.25; if vs.flag = 1 then do; eta1 = b0 + b1*lnbldT; llbin = anybc.cens.ind*eta1 - log(1+exp(eta1)); eta2 = a0 + a1*lnndsTs; llnorm = -1/(2*sigsq)*(lnbldT - eta2)**2 - .5*log(sigsq); ll = llbin + llnorm; end; else do; eta2 = a0 + a1*lnndsTs;...