search for: lambdas

Displaying 20 results from an estimated 1577 matches for "lambdas".

Did you mean: lambda
2007 Sep 10
2
Are the error messages of ConstrOptim() consisten with each other?
Dear Friends. I found something very puzzling with constOptim(). When I change the parameters for ConstrOptim, the error messages do not seem to be consistent with each other: > constrOptim(c(0.5,0.3,0.5), f=fit.error, gr=fit.error.grr, ui=ui,ci=ci) Error in constrOptim(c(0.5, 0.3, 0.5), f = fit.error, gr = fit.error.grr, : initial value not feasible > constrOptim(c(0.5,0.9,0.5),
2007 Sep 09
2
What does it mean by "initial value not available"?
Dear friends. I use ConstrOptim( ) and got error message "initial value not available". My understanding of "initial value not available" is that one of the following 3 cases happens: 1.The objective function is not well defined at the point of the initial value. 2. The differentiation of the objective function is not well defined at the point of the initial value. 3. The
2011 Apr 19
1
How to Extract Information from SIMEX Output
Below is a SIMEX object that was generated with the "simex" function from the "simex" package applied to a logistic regression fit. From this mountain of information I would like to extract all of the values summarized in this line: .. ..$ variance.jackknife: num [1:5, 1:4] 1.684 1.144 0.85 0.624 0.519 ... Can someone suggest how to go about doing this? I can extract the
2020 Oct 23
3
formula mungeing
Suppose I have a formula like this: f <- y ~ qss(x, lambda = lambdas[1]) + qss(z, lambdas[2]) + s I?d like a function, g(lambdas, f) that would take g(c(2,3), f) and produce the new formula: y ~ qss(x, lambda = 2) + qss(z, 3) + s For only two qss terms I have been using g <- function(lambdas, f){ F <- deparse(f) F <- gsub("lambdas\\[1\\]&q...
2007 Jun 11
0
biplot package II
Dear all, I've been learning biplot (Gabriel, 1971) and some days ago I sent for this list a procedural function with invitation for a collaborative package. Jari Oksanen made some suggestions and I agree with all. So, I reworked the function under the object-oriented programming (OOP/S3). I think it is now a good frame for more resources. Below it is the function and a small script to
2006 Oct 11
3
for loop not working in function
I'm trying to write a small function (below) to compute Box & Cox transformations of x for arbitrary values of lambda. I'd like to specify a range of values for lamba (min,max,step) and am having trouble getting the for loop to work. Suggestions? Any pointers to resources for learning to write functions in R for neophyte programmers? Thanks. --Dale boxcox <-
2007 Jan 19
3
integrate and quadratic forms
Hi all. I'm trying to numerically invert the characteristic function of a quadratic form following Imhof's (1961, Biometrika 48) procedure. The parameters are: lambda=c(.6,.3,.1) h=c(2,2,2) sigma=c(0,0,0) q=3 I've implemented Imhof's procedure two ways that, for me, should give the same answer: #more legible integral1 = function(u) {
2011 Nov 11
1
Random-walk Metropolis-Hasting
Following is my code, can some one help on the error at the bottom? > mh<-function(iterations,alpha,beta){ + data<-read.table("epidemic.txt",header = TRUE) + attach(data, warn.conflicts = F) + k<-97 + d <- (sqrt((x-x[k])^2 + (y-y[k])^2)) + p <- 1-exp(-alpha*d^(-beta)) + p.alpha<-1 - exp(-3*d^(-beta)) + p.beta <- 1 - exp(alpha*d^(-2)) +
2011 Sep 11
3
(no subject)
Dear all, Can anyone take a look at my program below? There are two functions: f1 (lambda,z,p1) and f2(p1,cl, cu). I fixed p1=0.15 for both functions. For any fixed value of lambda (between 0.01 and 0.99), I solve f1(p1=0.15, lambda=lambda, z)=0 for the corresponding cl and cu values. Then I plug the calculated cl and cu back into the function f2. Eventually, I want to find the lambda value
2010 Aug 18
1
Displaying Results in Two Columns
Could I have some suggestions as to how (various ways) I can display my confidence interval results? rm(list = ls()) set.seed(1) func <- function(d,t,beta,lambda,alpha,p.gamma,delta,B){ d <- c(5,1,5,14,3,19,1,1,4,22) t <- c(94.32,15.72,62.88,125.76,5.24,31.44,1.048,1.048,2.096,10.48) post <- matrix(0, nrow = 11, ncol = B) theta <- c(lambda,beta) beta.hat <- 2.471546 for(j
2006 Feb 10
8
Fitdistr and MLE for parameter lambda of Poisson distribution
Hello! I would like to get MLE for parameter lambda of Poisson distribution. I can use fitdistr() for this. After looking a bit into the code of this function I can see that value for lambda and its standard error is estimated via estimate <- mean(x) sds <- sqrt(estimate/n) Is this MLE? With my poor math/stat knowledge I thought that MLE for Poisson parameter is (in mixture of LaTeX
2006 Jul 29
1
uniroot
Hello, I am struggling to find the root of a exponent function. "uniroot" is complaining about a values at end points not of opposite sign? s<- sapply(1:length(w),function(i) + { + + + + + uniroot(saeqn,lower=-5000,upper=0.01036597923,l=list(t=w[i],gp=gp))$root + }) Error in uniroot(saeqn, lower = -5000, upper = 0.01036597923, l = list(t = w[i], : f() values at
2007 Sep 24
1
Root finding problem
Hello, I have a problem finding a root of a function, which I define like this: tuki <- function(u, x, a, lambda){ if((lambda%%1>0) & u<0) {u<-(u+0i)} f <- Re(x-(a*(u)^lambda-(1-(u))^lambda)/lambda) f } What I want to do is to find the root, but without specifying the interval within which to search for it. I can do it easily in MATLAB with fsolve() or fzero() functions. I
2001 Sep 20
3
indexing an array
Dear everybody, I have a following problem. I have a 3D array lambda <- array( dim=c(N,M,M-1)) where I have to extract the elements as follows: lambda[ 1, state[1], 1] lambda[ 1, state[1], 2] ... lambda[ 1, state[1], M-1] lambda[ 2, state[2], 1] ... lambda[ 2, state[2], M-1] ... lambda[ N, state[N], M-1] i.e. the result should be a 2D array, where the second index follows the first one
2004 Jul 03
2
DSTEIN error (PR#7047)
Full_Name: Stephen Weigand Version: 1.9.0 OS: Mac OS X 10.3.4 Submission from: (NULL) (68.115.89.235) When running an iteratively reweighted least squares program R crashes and the following is written to the console.app (when using R GUI) or to stdout (when using R from the command line): Parameter 5 to routine DSTEIN was incorrect Mac OS BLAS parameter error in DSTEIN, parameter #0,
2020 Oct 23
0
formula mungeing
...la performing the replacement: g <- function(e, ...) { if (length(e) > 1) { if (identical(e[[2]], as.name(names(list(...))))) { e <- eval(e, list(...)) } if (length(e) > 1) for (i in 1:length(e)) e[[i]] <- Recall(e[[i]], ...) } e } g(f, lambdas = 2:3) ## y ~ qss(x, lambda = 2L) + qss(z, 3L) + s On Fri, Oct 23, 2020 at 9:33 AM Koenker, Roger W <rkoenker at illinois.edu> wrote: > > Suppose I have a formula like this: > > f <- y ~ qss(x, lambda = lambdas[1]) + qss(z, lambdas[2]) + s > > I?d like a function...
2013 Feb 12
8
Help with functions as arguments
Hi, I am trying to write a function which defines some arguments, then uses those arguments as arguments of other function calls. It's a bit tricky to explain, so a simple example will have to suffice. I imagine this has a simple solution, but perusing through environments and other help lists has not helped. Suppose I have two functions: f1 = function(a) {     b = a + 1     b } f2 =
2011 Nov 14
2
how to include integrate in a function that can be solved with uniroot?
Hallo, I am trying to define expectation as an integral and use uniroot to find the distribution parameter for a given expectation. However I fail to understand how to define properly the functions involved and pass the parameters correctly. Can anyone help me out? Thanks, Gerrit Draisma. This what I tried: ======= > # exponential density > g <- function(x,lambda){ lambda
2004 May 19
3
greek letters in plots
Hi, I want to write in x axis label "fitted value of lambda" (lambda in greek letter). xlab=expression(lambda) gives the "lambda", I tryed things like xlab=paste ("fitted value of ", expression(lambda)) but I didn't get the greek letter. Thanks in advance for any hint. Antonio Olinto ------------------------------------------------- WebMail Bignet - O seu
2004 Sep 23
1
noncentrality paramter in power.anova.test (PR#7244)
Full_Name: Version: 1.9.0 OS: Windows XP Submission from: (NULL) (134.126.93.191) I believe the noncentrality parameter, lambda, in power.anova.test is incorrect. The noncentrality paramter is defined as lambda <- (groups - 1) * n * (between.var/within.var). The n should not be there. The function pf defines the noncentrality parameter as the sum of squares of the means. Therefore, the