[R] [R-pkgs] release of SCperf 1.1.1 and bullwhipgame packages

2018-03-02 Thread marlene marchena
to contribute to the project please do not hesitate to contact me. Kind regards, Marlene Marchena [[alternative HTML version deleted]] ___ R-packages mailing list r-packa...@r-project.org https://stat.ethz.ch/mailman/li

[R] SCperf package is now available on CRAN

2012-02-06 Thread marlene marchena
t package for R. Suggestions, bug reports and other comments are very welcome. All the best, Marlene Marchena. [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the pos

Re: [R] problems to report indexes when I have two min value

2011-09-16 Thread marlene marchena
x, na.rm = TRUE))) > > k > [[1]] > [1] 2 4 > > [[2]] > [1] 4 > > [[3]] > [1] 4 > > [[4]] > [1] 4 > > > sapply(k, paste, collapse = ', ') > [1] "2, 4" "4""4""4" > > > > > On Fr

Re: [R] problems to report indexes when I have two min value

2011-09-16 Thread marlene marchena
age for ?min. > JC > > 2011/9/16 marlene marchena : > > Hi, > > > > I need to repor the index of a min value of each row in a matrix, but I > > don't know how to do that when I have more than one min value. > > > > Here is my example > > > &

[R] problems to report indexes when I have two min value

2011-09-16 Thread marlene marchena
Hi, I need to repor the index of a min value of each row in a matrix, but I don't know how to do that when I have more than one min value. Here is my example > dat <- matrix(c(5.4,4.8,5.6,4.8,NA,4.4,4.6,3.4,NA,NA,4,2.4,NA,NA,NA,2),byrow=TRUE,ncol=4) > dat [,1] [,2] [,3] [,4] [1,] 5.4 4.8

Re: [R] hola

2010-07-19 Thread marlene marchena
Very sorry about that! 2010/7/19 marlene marchena > Hola amor! > > Finalmente llegué a D.C. Ya estoy en el albergue pero el cuarto solo va a > ser liberado a la una o tal vez dos de la tarde. Pero no importa al menos ya > estoy aqui, ya tomé desayuno que por cierto es horrib

[R] hola

2010-07-19 Thread marlene marchena
Hola amor! Finalmente llegué a D.C. Ya estoy en el albergue pero el cuarto solo va a ser liberado a la una o tal vez dos de la tarde. Pero no importa al menos ya estoy aqui, ya tomé desayuno que por cierto es horrible. Voy a poder tomar baño y usar un locker por un dolar. Entonces voy a tomar baño

[R] cut edge from surface using persp()

2010-06-09 Thread marlene marchena
Hi R users! Is it possible to cut the edges from a surface graph without to cut the axes using persp function? I am using the following code: op <- par(bg = "white") persp(phi1, phi2, z,main="Bullwhip generated with AR(2) demand when L=1", xlab ="phi1" , ylab ="phi2", zlab ="Bullwhip", t

Re: [R] programing problem with for( )

2010-02-01 Thread marlene marchena
VarD; arma1=ARMAtoMA(ar=phi, ma=theta,L); arma2=arma1^2; totalLT = 0 for (i in 1:L-1) { valsumLT= sum(arma2[1:(L-i)]); totalLT = totalLT + valsumLT; } VarLT=L+totalLT; sc=c(bull=M,VarD=VarD,VarLT=VarLT) return(sc) } 2010/2/1 Ted Harding > On 01-Feb-10 11:29:40, marlene marchena wrote: &

[R] programing problem with for( )

2010-02-01 Thread marlene marchena
Hi R-users I'm writing a code to run a fuction but I found an error that I can't fix. I reproduced the error with a simple example. The correct answer is k but I can't fill my s matrix. What I'm doing wrong? s<-matrix(data=NA,nrow=1,ncol=5 ) s for(i in 1:5) { k=sqrt(i) s[,i

Re: [R] AMRAtoMA

2009-11-17 Thread marlene marchena
Hi Matt, The ARMA model write the MA part with positive coefficients, therefore the formula that you write for the variance is wrong. Here an example where the answer is the same for both methods. phi=0.75 theta=-0.4 coefvar=(1+theta^2+2*phi*theta)/(1-phi^2) coefvar result <- ARMAtoMA(ar=c(0.75

Re: [R] programming to calculate variance

2009-09-30 Thread marlene marchena
both problems with overwriting subsequent > x-values and obeying the precedence of R operators. > For the latter, see ?Syntax and compare > i<-5 > i-3:i-1 > (i-3):(i-1) > > hth. > > marlene marchena schrieb: > >> Dear R-user >> >> Suppose I have

Re: [R] programming to calculate variance

2009-09-30 Thread marlene marchena
Hi Petr, Thanks for your suggestion. It woks, but now I have other problem the positions of the values changed. I need the NA values in the three first positions. y=c(2,1,5,8,11,3,1,7,50,21,33,7,60) x=as.zoo(y) > x 1 2 3 4 5 6 7 8 9 10 11 12 13 2 1 5 8 11 3 1 7 50 21 33 7 60 va

[R] programming to calculate variance

2009-09-30 Thread marlene marchena
Dear R-user Suppose I have the following data y=c(2,1,5,8,11,3,1,7,50,21,33,7,60) x=data.frame(y) for(i in 4:nrow(x)) x[i,] =var(x[i-3:i-1,]) I'm trying to get a new variable with the variance of the 3 previous values (just an example) and with NA in the three first positions. I know that my

Re: [R] SVM coefficients

2009-09-01 Thread marlene marchena
Hi, A long time I have some problems to run a SVM - regression. Here an example with the Ozone data that represents very well my own data. data(Ozone, package = "mlbench") #I cut the three first variables and splite the data in two parts Ozone<- na.omit(Ozone[, -(1:3)]) index <- 1:nrow(O

Re: [R] How to get w and b in SVR? (package e1071)

2009-08-04 Thread marlene marchena
5 -0.978089239 1.331999124 8 -0.683566350 -0.588683840 1.708596139 0.141129535 -0.656754703 -0.051154801 -0.970752111 9 -0.028332192 -0.687146676 -0.590083898 1.644118288 0.113678155 -0.653662187 -0.037204315 10 0.659663673 -0.030727774 -0.688598758 -0.594375599 1.562091927 0.11878

[R] How to get w and b in SVR? (package e1071)

2009-08-03 Thread marlene marchena
Dear R users, I'm running a SVR in package e1071 but I did not able to calculate the parameters w and b of the regression. I don't know how to do that and if it is possible to do it with this package. Someone have some idea. Any help would be much appreciated. Marlene [[alternative HTML

Re: [R] Logistic regression and R

2009-07-31 Thread marlene marchena
Hi there, I take advantage of this chat to ask other question related to logistic regression. This is my first time as well. I have data that I want to model but I’m not sure if glm() is the correct function to use. My problem is as follow, I used Oxford Instability Score of the shoulder (OIS,

[R] How to get w in SVR with e1071 package

2009-07-23 Thread marlene marchena
> > Hi all, > > I need some help about how to calculate w in a SVR in package e1071. > > I have a regression y_i=f(x_i)+e > > where f(*x*)=(w,phi(x))+b > > then go on with the SVR calculation I know that w*=Sum_i=1^n [(á_i - > á*_i)K(x,x_i) ] where á_i and á*_i are the lagrangian multipliers of the

[R] How to get w in a SVR_package e1071

2009-07-23 Thread marlene marchena
Hi R user, I need some help about how to calculate w in a SVR in package e1071. I have a regression y_i=f(x_i)+e where f(*x*)=(w,phi(x))+b then go on with the SVR calculation I know that w*=Sum_i=1^n [(á_i - á*_i)K(x,x_i) ] where á_i and á*_i are the lagrangian multipliers of the dual form. o.

Re: [R] Predict GARCH

2009-06-11 Thread marlene marchena
So christofer proved (carry on the same procedure infinite times) that the forecast of the variance converge to the long run variance when a+b<1 E(Sigma[t+2]^2) = w/(1-a-b) + [(a+b)^t]* Sigma[t+1]^2 Therefore when you predict n.ahead = 20 it must to converge to the long run variance. It can be

Re: [R] How to replace Inf by zero?

2009-05-29 Thread marlene marchena
Thanks a lot Andrea, it works! Marlene. 2009/5/29 Andrea Weidacher > Hi Marlene, > > try this: > > x[which(x==Inf)] <- 0 > > Andrea. > > ------ > *Von:* marlene marchena > *An:* R-help@r-project.org > *Gesendet:* Freitag, den 29.

[R] How to replace Inf by zero?

2009-05-29 Thread marlene marchena
Hi R users, Someone knows how to replace Infinite value by zero. I have a vector with some Inf value and I want to substitute these values by zero to get the mean of the components of the vector. Any idea? Many thanks, Marlene. [[alternative HTML version deleted]]

Re: [R] Problems to run SVM regression with e1071

2009-05-12 Thread marlene marchena
Hi, > Is the variable st character or a factor? What does str(train$st) show? > str(train$st) Factor w/ 208 levels "0,000","0,0058643",..: 132 134 41 29 42 151 195 195 196 207 ... Thank you very much Max with your help I found my error, now it works. Marlene.

[R] Problems to run SVM regression with e1071

2009-05-11 Thread Marlene Marchena
Hi R users, I'm trying to run a SVM - regression using e1071 package but the function svm() all the time apply a classification method rather than a regression. svm.m1 <- svm(st ~ ., data = train, cost = 1000, gamma = 1e-03) Parameters: SVM-Type: C-classification SVM-Kernel: