Re: [R] Generating all possible partitions

2005-11-26 Thread Ales Ziberna
Thank you all for your answers. Unfortunately, I have realized that my example was flawed. There are obviously 3 partitions of 3 objects into 2 classes: 1 1 2 1 2 1 2 1 1 I would like to emphasize that the numbers are not important, for example, we could exchage 1s and 2s or even

[R] obtaining a ROC curve

2005-11-26 Thread Anjali Karve
Hello, I have a classification tree. I want to obtain a ROC curve for this test. What is the easiest way to obtain one? -Anjali - [[alternative HTML version deleted]] __

[R] Double FOR

2005-11-26 Thread Ginestet, Cedric
Hi, I want to run through a formula several times with several different variables (which are defined by independent vectors of equal length 10 elements). It looks like this: function (m,s,y) { for (j in m){ for (k in s){ for (i in y){

Re: [R] optim

2005-11-26 Thread Martin Maechler
Further note, that the standard package 'stats4' has a function mle() which was written exactly for problems like yours {and mle() internally calls optim() !}. But are we sure we are not solving your homework assignment here? Sundar == Sundar Dorai-Raj [EMAIL PROTECTED] on Fri, 25 Nov

Re: [R] Double FOR

2005-11-26 Thread Ales Ziberna
Maybe you whould try: One of your problems is that you are rewriting the resoults so that the resoult you get is only for the final combination of m, s, y. Secondly, I am not sure if you want to use in the equation elements of m, s, y, or the whole vectors. function (m,s,y) { DIC.hat-NULL

Re: [R] Double FOR

2005-11-26 Thread hadley wickham
I want to run through a formula several times with several different variables (which are defined by independent vectors of equal length 10 elements). It looks like this: One way would be explicitly create your data first: df - expand.grid(a = 1:5, b= 1:5, c=1:5) And then take advantage of

Re: [R] Use of nesting in lmer- error in numerical expression

2005-11-26 Thread Douglas Bates
On 11/25/05, Arild Husby [EMAIL PROTECTED] wrote: Dear R users, I am trying to fit a GLMM using lmer to a dataset where the brood identity (LNRREIR) is nested within mothers identity. The reason for this is that each mother can have several nests within each year and also between years.

[R] How to do the multiple plots?

2005-11-26 Thread Wei Qiu
Hi all, I am new in R tool. I have a basic question. I would like to do a combination of two multiple lines plots for one X-variable and two different sets (lists) of Y-variables. Any suggestion will be greatly appreciated. Thanks! Wei __

Re: [R] How to do the multiple plots?

2005-11-26 Thread Gabor Grothendieck
?lines ?matplot ?ts.plot library(zoo); ?plot.zoo On 11/26/05, Wei Qiu [EMAIL PROTECTED] wrote: Hi all, I am new in R tool. I have a basic question. I would like to do a combination of two multiple lines plots for one X-variable and two different sets (lists) of Y-variables. Any suggestion

Re: [R] How to do the multiple plots?

2005-11-26 Thread Wei Qiu
Dear Babor and all, Thanks for your quick response. I tried the following. We can plot y1 and Y2 on one figs. It just shows one Y axis on the left side. I would like to show the Y1 axis on left side and Y2 Axis on right side. Any others input, Wei On Sat, 26 Nov 2005, Gabor Grothendieck

Re: [R] How to do the multiple plots?

2005-11-26 Thread Wei Qiu
On Sat, 26 Nov 2005, Wei Qiu wrote: Dear Gabor and all, Thanks for your quick response. I tried the following. We can plot y1 and Y2 on one figs. It just shows one Y axis on the left side. I would like to show the Y1 axis on left side and Y2 Axis on right side. Any others input, Wei On

[R] Misure di sicurezza di cliente

2005-11-26 Thread Bpol
Caro [EMAIL PROTECTED] , Recentemente abbiamo notato uno o piĆ¹ tentativi di entrare al vostro conto di BancoPostaonline da un IP indirizzo differente. Se recentemente accedeste al vostro conto mentre viaggiavate, i tentativi insoliti di accedere a vostro Conto

[R] Newton iteration questions

2005-11-26 Thread yuying shi
Dear Sir/Madam, If I have a sample of observations that come from an extreme value distribution, the density function for the extreme value distribution is: f(x)=(1/b)exp[-(x-a)/b]exp{-exp[-(x-a)/b]}, b0, x can be any value, my question is how to implement the Newton iteration and

[R] IRT Package

2005-11-26 Thread Caio Lucidius Naberezny Azevedo
Hi all, Could anyone tell me if there is some package that fits any Item Response Model (further the ltm package)? Regards, Caio - [[alternative HTML version deleted]] __

[R] Using an editor with R

2005-11-26 Thread Walter R. Paczkowski
Hello, I changed the setting in options$editor to allow me to use my favorite editor. In R 2.1.1 on Windows XP, I entered at the command line: options(editor=c:\\program files\\winedit\\winedit.exe) When I edited a function, say test, using fix(test), the editor opened perfectly. But, when

[R] What does KalmanRun$states really return?

2005-11-26 Thread charles loboz
For Kalman Filter Durbin/Koopman give at p67 equations 4.13: v = y - Z a, F = Z P Z' + H, K = T P Z' / F + H, a[t+1] = T a + K v, P[t+1] = T P L' + R Q R' for P1 = 0, Q=0, T=Z=R=1 that reduces to: v = y - a, F = H, K = H, a[t+1] = a + K v, P[t+1] = 0

Re: [R] How to do the multiple plots?

2005-11-26 Thread Gabor Grothendieck
axis(4, .,..) does it. Try RSiteSearch(axis(4,) to locate examples. On 11/26/05, Wei Qiu [EMAIL PROTECTED] wrote: On Sat, 26 Nov 2005, Wei Qiu wrote: Dear Gabor and all, Thanks for your quick response. I tried the following. We can plot y1 and Y2 on one figs. It just shows one

Re: [R] Using an editor with R

2005-11-26 Thread Duncan Murdoch
On 11/26/2005 4:53 PM, Walter R. Paczkowski wrote: Hello, I changed the setting in options$editor to allow me to use my favorite editor. In R 2.1.1 on Windows XP, I entered at the command line: options(editor=c:\\program files\\winedit\\winedit.exe) When I edited a function, say test,

Re: [R] Using an editor with R

2005-11-26 Thread Gabor Grothendieck
But beware of those untrustworthy ESS users :) From www.vim.org: The spammers have found us [2005-11-18] I suppose I should be surprised that it took this long but it appears as if the spammers have found us. There are two things that I want to do to fix this: (1) Implement moderators, (2)

[R] coherency-Time Series

2005-11-26 Thread svenier
hello! My name is Stefanos, from Athens. I'm a new user of R and I'm studying multivariate time series. I can't find in the help menu how to calculate the cross spectrum and the coherency of 2 Time Series. Would you like to help me? Thanks __

[R] creating a factor from other factors and ifelse

2005-11-26 Thread dimitrijoe
Hi, Given sec98 - factor(rep(1:2,3), labels=c(A, B)) sec99 - factor(rep(2:1,3), labels=c(A, B)) sec99[c(2,5)] - NA sec00 - factor( c( rep(1,3), rep(2,3) ), labels=c(A, B)) sec00[c(2,4)] - NA sec1 - ifelse(!is.na(sec99), sec99, ifelse(!is.na(sec00), sec00, NA )) We get

[R] creating a factor from other factors and ifelse

2005-11-26 Thread dimitrijoe
Hi, Given sec98 - factor(rep(1:2,3), labels=c(A, B)) sec99 - factor(rep(2:1,3), labels=c(A, B)) sec99[c(2,5)] - NA sec00 - factor( c( rep(1,3), rep(2,3) ), labels=c(A, B)) sec00[c(2,4)] - NA sec1 - ifelse(!is.na(sec99), sec99, ifelse(!is.na(sec00), sec00, NA )) We get

[R] creating a factor from other factors and ifelse

2005-11-26 Thread dimitrijoe
Hi, Given sec98 - factor(rep(1:2,3), labels=c(A, B)) sec99 - factor(rep(2:1,3), labels=c(A, B)) sec99[c(2,5)] - NA sec00 - factor( c( rep(1,3), rep(2,3) ), labels=c(A, B)) sec00[c(2,4)] - NA sec1 - ifelse(!is.na(sec99), sec99, ifelse(!is.na(sec00), sec00, NA )) We get

[R] creating a factor from other factors and ifelse

2005-11-26 Thread dimitrijoe
Hi, Given sec98 - factor(rep(1:2,3), labels=c(A, B)) sec99 - factor(rep(2:1,3), labels=c(A, B)) sec99[c(2,5)] - NA sec00 - factor( c( rep(1,3), rep(2,3) ), labels=c(A, B)) sec00[c(2,4)] - NA sec1 - ifelse(!is.na(sec99), sec99, ifelse(!is.na(sec00), sec00, NA )) We get

[R] creating a factor from other factors and ifelse

2005-11-26 Thread dimitrijoe
Hi, Given sec98 - factor(rep(1:2,3), labels=c(A, B)) sec99 - factor(rep(2:1,3), labels=c(A, B)) sec99[c(2,5)] - NA sec00 - factor( c( rep(1,3), rep(2,3) ), labels=c(A, B)) sec00[c(2,4)] - NA sec1 - ifelse(!is.na(sec99), sec99, ifelse(!is.na(sec00), sec00, NA )) We get

[R] r question

2005-11-26 Thread yuying shi
If there are two random variable X1 and X2 which have a bivariate normal distribution with mean vector (10, 10)and variance covariance matrix [21.95 1.953] How to calculate the mean and variance of the function Y=X1/X2? Thanks a lot! xingyu

Re: [R] finding peaks in a simple dataset with R

2005-11-26 Thread Dylan Beaudette
On Nov 25, 2005, at 10:27 AM, Martin Maechler wrote: Let me try to summarize my view on this: - I still it would make sense to have a *simple* peaks() function in R which provides the same (or more) functionality as the corresponding S-plus one.From For a proper data analysis

Re: [R] creating a factor from other factors and ifelse

2005-11-26 Thread Gabor Grothendieck
We don't need the inner if, ifelse does not work with factors as I think you expect and in any case we really want to create a new factor with a new set of levels consisting of those in the new variable sec.char - ifelse(is.na(sec99), as.character(sec00), as.character(sec99)) factor(sec.char) or

[R] obtaining p values CI for a non-parametric correlation matrix

2005-11-26 Thread Bob Green
Hello, I tried to obtain a nonparametric correlation matrix with the following syntax: by(mydat, mydat$GROUP, function(subset) { matrix - cbind(subset$WK1FREQ, subset$WK2FREQ, subset$WK3FREQ, subset$WK4FREQ, subset$BESTDAY) cor(matrix, method=kendall,use=pairwise.complete.obs) }) Error: syntax

Re: [R] finding peaks in a simple dataset with R

2005-11-26 Thread Philippe Grosjean
Hello, This is interesting! Note that you have the turnpoints() function in pastecs library. The function calculates all peaks and pits in a series. It also calculates information of each turning point (peak or pit), according to Kendall's information theory. It is then possible to filter