similar to: for loop, my program does not make a cycle

Displaying 20 results from an estimated 10000 matches similar to: "for loop, my program does not make a cycle"

2011 Mar 10
2
R beginner - Error in as.vector(x, mode)
Hi everyone, I am new to R and keep getting the message Error in as.vector(x, mode) while trying to run nlsystemfit. Below is my exact code. The data is in Stata format because I only recently swapped to R and am trying to compare results from Stata to make sure I know what is going on. I have searched google and read sever R-help articles with this error. They all say the problem is to do
2017 Aug 25
2
retrieve machine password in current Samba?
We have a wireless network that uses 802.1x authentication, in which domain joined computers use their machine credentials to connect. Windows machines do this automatically, and until recently Linux computers could join using wicd, wpa-supplicant, and a simple script that would retrieve the machine password with tdbdump. ( specifically tdbdump -k SECRETS/MACHINE_PASSWORD/DOMAIN
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",
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 gradient of the
2008 May 12
1
problem configuring package udunits
Hi R Users, I am new to running R on a Linux platform (I'm used to Windows) - I'm running R 2.7.0 on Ubuntu 7.10 (Gutsy) as sudo (without Emacs). My architecture is Pentium D (x86_64). I am having problems successsfully configuring the downloaded package 'udunits'. When I execute > install.packages("udunits", lib="/usr/local/lib/R/library") I get the
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
2012 Apr 07
1
Systemfit with structural equations and cross equation parameter interaction
Hi there, I want to estimate simultaneous equation model with panel data. The model looks as follows Y1=a0+a1*X1+a2*X2 Y2=b0+b1*X2+b2*X1 X1=Z1-(Y1/a1) X2=Z2-(Y2/b1) I In this model Y1, Y2, X1 and X2 are endogenous variables; Z1, Z2 are exogenous variables and a0, a1, a2, b0, b1 and b2 are parameters. Could any one please help me how to estimate this model in R. Thanking you in anticipation
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)
2005 Jul 13
1
Fieller's Conf Limits and EC50's
Folks I have modified an existing function to calculate 'ec/ld/lc' 50 values and their associated Fieller's confidence limits. It is based on EC50.calc (writtien by John Bailer) - but also borrows from the dose.p (MASS) function. My goal was to make the original EC50.calc function flexible with respect to 1) probability at which to calculate the expected dose, and 2) the link
2005 Nov 29
2
cheb_poly_eva using Clenshaw's recurrence formula
Hi, After reading the paper entitled "The Computation of Line Spectral Frequencies Using Chebyshev Polynomials", P. Kabal and R. Ramachandran, IEEE Trans. on ASSP, Vol. 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
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
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),
2009 Feb 19
2
bugfix for nls with port algorithm (PR#13540)
Full_Name: Manuel A. Morales Version: 2.8.1 OS: Linux Submission from: (NULL) (137.165.199.246) When fitting a model in nls using the algorithm port with constraints and the shorthand parameter[factor] in the model, I get the following error message: "Error in nls_port_fit(m, start, lower, upper, control, trace) : (list) object cannot be coerced to type 'double' In addition:
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"):
2006 Jul 25
1
HELP with NLME
Hi, I was very much hoping someone could help me with the following. I am trying to convert some SAS NLMIXED code to NLME in R (v.2.1), but I get an error message. Does anyone have any suggestions? I think my error is with the random effect "u" which seems to be parametrized differently in the SAS code. In case it's helpful, what I am essentially trying to do is estimate parameters
2017 Nov 24
1
SSL configuration
Hello subscribers, I have a very strange question regarding SSL setup on gluster storage. I have create a common CA and sign certificate for my gluster nodes, placed host certificate, key and common CA certificate into /etc/ssl/, create a file called secure-access into /var/lib/glusterd/ Then, I start glusterd on all nodes, system work fine, I see with peer status all of my nodes. No problem.
2008 Oct 04
1
syntax to restrict coefficient in lm()
Hi, I would like to estimate an error correction model with lm() but I don't find the correct syntax for that. The model (leaving out the time indices) looks like: dY = a0 - a1 * (Y - b1*X) + b0*dX + e the problem is the term - a1 * (Y - b1*X). How can I restrict a1 to be the same for both Y and -b1*X ? Thanks for considering my question! All the best, Werner
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 transfer an string to
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 answer,
2003 Apr 19
1
nls, gnls, starting values, and covariance matrix
Dear R-Help, I'm trying to fit a model of the following form using gnls. I've fitted it using nlsList with the following syntax: nlsList(Y~log(exp(a0-a1*X)+exp(b0-b1*X))|K,start=list (a0=6,a1=0.2,b0=4.5,b1=0.001),data=data.frame(Y=y,X=X,K=k))) which works just fine: <snip> Coefficients: a0 a1 b0 b1 1 5.459381 0.5006811 5.137458 -0.0040548687