Re: [R] distance method in kmeans

2007-04-23 Thread Bettina Gruen
Chandra, you might want to have a look at package flexclust. Best, Bettina Ranga Chandra Gudivada wrote: I am trying to cluster some binary data using k-means . As the regular kmeans available from stats package in R does'nt provide the option to change the distance method. I was wondering

Re: [R] Extracing Interval of Time in seconds in R

2007-04-23 Thread ecatchpole
?system.time might be what you're looking for. Ted. Mohammad Ehsanul Karim wrote on 04/23/2007 03:53 PM: Dear List, I want to let R calculate the time (run-time) it requires to run a self-written simulation function. I tried as follows: it enables me to see the starting and finishing

Re: [R] Problem with dgamma ?

2007-04-23 Thread Peter Dalgaard
Tong Wang wrote: Hi All, Here 's what I got using dgamma function : nu-.2 nu*log(nu)-log(gamma(nu))+(nu-1)*log(1)-nu*(1) [1] -2.045951 dgamma(1,nu,nu,1) [1] 0.0801333 dgamma(1,nu,nu,0) [1] NaN Warning message: NaNs produced in: dgamma(x, shape,

Re: [R] Extracing Interval of Time in seconds in R

2007-04-23 Thread Mohammad Ehsanul Karim
The following seem to work: begin.time-Sys.time() begin.times - format(begin.time, %a %b %d, %Y at %X) end.time-Sys.time() end.times - format(end.time, %a %b %d, %Y at %X) run.time-difftime(end.time,begin.time,units=secs) cat( Start time:, begin.times , \n, Finish time:, end.times, \n, Run

Re: [R] Open source community help-desks

2007-04-23 Thread Ted Harding
On 22-Apr-07 20:51:09, Jeffrey Miller wrote: I read the reply earlier in which Nima was naughty-naughty'd for calling us a Help Desk. And, I have to admit that I agree. Well, we're not a Help Desk of the kind that puts you on hold, listening to the Free Software Song[1] round and round ... but

Re: [R] Suggestions for statistical computing course

2007-04-23 Thread Simon Blomberg
On Fri, 2007-04-20 at 12:13 -0400, Fred Bacon wrote: Ideally, it would work like this: The free VMware player is installed on each of the lab computers. The lab manager uses a licensed copy of VMware Workstation to create a clean image of a computer. You can use the open

Re: [R] Estimates at each iteration of optim()?

2007-04-23 Thread Peter Dalgaard
DEEPANKAR BASU wrote: I am trying to maximise a complicated loglikelihood function with the optim command. Is there some way to get to know the estiamtes at each iteration? When I put control=list(trace=TRUE) as an option in optim, I just got the initial and final values of the

Re: [R] Suggestions for statistical computing course

2007-04-23 Thread Vikas Rawal
2. I do most of my work in R using Emacs and ESS. That means that I keep a file in an emacs window and I submit it to R one line at a time or one region at a time, making corrections and iterating as needed. When I am done, I just save the file with the last, working, correct

[R] Do *NOT* repost ! {Re: about R square value}

2007-04-23 Thread Martin Maechler
Dear Nitish, Please do *NOT* resend your message several times to the R-help mailing list. This is considered very impolite. Nitish == Nitish Kumar Mishra [EMAIL PROTECTED] on Sun, 22 Apr 2007 16:39:03 +0530 (IST) writes: Nitish Hi, I am simply asking about coefficient od

Re: [R] extracting the mode of a vector

2007-04-23 Thread Gad Abraham
Benoît Lété wrote: Hello, I have an elementary question (for which I couldn't find the answer on the web or the help): how can I extract the mode (modal score) of a vector? Assuming that your vector contains only integers: v - sample(1:5, size=20, replace=T) v [1] 1 1 1 1 2 3 5 1 1 5

[R] Does any package do stepwise using p-value criterian?

2007-04-23 Thread 李俊杰
Dear all, I found most of R packages do stepwise model selection with AIC criterian. I am doing a study on the comparison of severy popular model selection methods including stepwise using p-value criterian. We know that in SAS the stepwise uses p-value criterian, so this method could be a

[R] extract from a data frame

2007-04-23 Thread elyakhlifi mustapha
hello, I'd like know how to do to extract data from a frame for example how can I do to extract only the data where variety=victory or variety=golden rain thanks. Oats Block Variety nitro yield 1 I Victory 0.0 111 2 I Victory 0.2 130 3 I Victory 0.4

[R] Random Forest

2007-04-23 Thread Ruben Feldman
Hi R-wizards, I ran a random forest on a dataset where the response variable had two possible values. It returned a warning telling me that it did regression and if that was really what I wanted. Does anybody know what is being in terms of the algorithm when it does a regression? (the random

[R] R: extract from a data frame

2007-04-23 Thread Guazzetti Stefano
Oats[Oats$Variety %in% c(Victory, Golden Rain),] or subset(Oats, Variety %in% c(Victory, Golden Rain)) Stefano -Messaggio originale- Da: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] conto di elyakhlifi mustapha Inviato: lunedì 23 aprile 2007 9.56 A: R-help@stat.math.ethz.ch Oggetto: [R]

[R] data recoding problem

2007-04-23 Thread Williams Scott
Hi R experts, I have a data recoding problem I cant get my head around - I am not that great at the subsetting syntax. I have a dataset of longitudinal toxicity data (for multistate modelling) for which I want to also want to do a simple Kaplan-Meier curve of the time to first toxic event. The

Re: [R] extract from a data frame

2007-04-23 Thread Julien Barnier
Hi, I'd like know how to do to extract data from a frame for example how can I do to extract only the data where variety=victory or variety=golden rain thanks. Oats Block Variety nitro yield 1 I Victory 0.0 111 2 I Victory 0.2 130 You can try :

Re: [R] data recoding problem

2007-04-23 Thread Dimitris Rizopoulos
one option is the following: do.call(rbind, lapply(split(tox, tox$id), function (x) { if (any(ind - x$event == 1)) x[which(ind)[1], ] else x[nrow(x), ] })) I hope it helps. Best, Dimitris Dimitris Rizopoulos Ph.D. Student Biostatistical Centre School of Public

[R] subset

2007-04-23 Thread elyakhlifi mustapha
hi, ok I understand how to use the subset function but sometimes I need to use it to extract data by date and its format it isn't so easy (like below) for example like in using SQL I thougth that it was possible to write %/2004 but it doesn't run. Can you help me please about this? subset(don,

Re: [R] Problem with dgamma ?

2007-04-23 Thread Ted Harding
On 23-Apr-07 04:41:03, ecatchpole wrote: dgamma(x=1, shape=nu, rate=nu, log=TRUE) [1] -2.045951 This is a good example of why you should call parameters by name. Ted. True up to the point that the log parameter is in the 5th position in the list of dgamma paramaters, so if its value is

[R] colored shading lines

2007-04-23 Thread Albrecht Kauffmann
Hi all, it there any possibility to draw colored shading lines of a polygon plot? E.g. plot(polygon_object,col=red,density=10,angle=45) produces only black shading lines within the polygon. With many thanks for any hint Albrecht __

Re: [R] how to convert the lower triangle of a matrix to a symmetricmatrix

2007-04-23 Thread Olivier ETERRADOSSI
Sorry if this answer was already given, or if I miss the point, but did you have a look to lowerTriangle and upperTriangle functions in the gdata package ? # example # A-matrix(rnorm(9),3,3) # B-B-matrix(NA,dim(A)[1],dim(A)[2]) # lowerTriangle(B)-lowerTriangle(A) #

[R] Help about princomp

2007-04-23 Thread annina
Hello, I have a problem with the princomp method, it seems stupid but I don't know how to handle it. I have a dataset with some regular data and some outliers. I want to calculate a PCA on the regular data and get the scores for all data, including the outliers. Is this possible on R? Thank you

Re: [R] Help about princomp

2007-04-23 Thread Prof Brian Ripley
On Mon, 23 Apr 2007, annina wrote: Hello, I have a problem with the princomp method, it seems stupid but I don't know how to handle it. I have a dataset with some regular data and some outliers. I want to calculate a PCA on the regular data and get the scores for all data, including the

[R] For Help in libm_c32.so for fortran

2007-04-23 Thread savita rai
Dear Sir I am running a script file for fortran but it showing error i.e. .sgb.x : /sbin/loader: Fatal Error : cannot map libm_c32.so here sgb.x is its output file that I have got after running make file. I have seached this library file inside /usr/shlib directory its not there. Please tel

Re: [R] Help about princomp

2007-04-23 Thread Christophe Bonenfant
Hi Annina, You may use the dudi.pca function in the ade4 package. PCA - dudi.pca(your_data, scale = FALSE, scan = FALSE) # to get scores PCA$li and you're done. Maybe have a look at ?dudi.pca Christophe annina a écrit : Hello, I have a problem with the princomp method, it seems stupid but

Re: [R] Random Forest

2007-04-23 Thread Arne.Muller
Ruben, Maybe your binary response is a numeric vector - try converting it into a factor with two levels. You probably want classification rather than regression (the dependent variable should be numeric and continous)! Arne -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL

Re: [R] about R squared value

2007-04-23 Thread Bernd Dittmann
Hi Nitish, R^2 cannot take values of greater than 1. Per definition (see http://en.wikipedia.org/wiki/Coefficient_of_determination) R^2 := 1- SSE/SST whereby SSE = sum of squared errors SST = total sum of squares For R^2 1 would require SSE/SST 0. Since SSE and SST are non-negative (check

[R] aggregate function

2007-04-23 Thread Michel Schnitz
Hello, is there a way to use the aggregate function to calculate monthly mean in case i have one row in data frame that holds the date like -mm-dd? i know that it works for daily means. i also like to do it for monthly and yearly means. maybe there is something like aggregate(x,

[R] a function with output from lmer

2007-04-23 Thread Rina Miehs
Hello there someone who knows this? im having some trouble with making a function that comes out with what i want. i have these vectors: x1 - factor(rep(1:2500,3*10)) x2 - factor(rep(1:25000,3)) x3 - factor(1:75000) y - rep(rnorm(2500,mean=0,sd=2),10*3)+

[R] automating merging operations from multiple dataframes

2007-04-23 Thread Jon Minton
Hi, I have a set of dataframes names AINDSLIM, BINDSLIM, CINDSLIM ... NINDSLIM In each dataframe I want to extract two variables, “pid” and “{w}region”, where {w} means “a”, “b”, “c”, ...”n” At the moment my code looks like: PidRegion - data.frame(pid=XWAVEID$pid) this.region -

Re: [R] limmaGUI

2007-04-23 Thread J . delasHeras
Quoting [EMAIL PROTECTED]: Dear all, I have a question about limmaGUI that is usually run in R environment. My problem is loading data into the programm. I have 6 gpr files that apparently are not compatible with limma. Everytime I'm trying to load the data (including a RNA targets file, an

[R] Changing working directory

2007-04-23 Thread Walter Paczkowski
Good morning, I keep copies my .RData file in different directories for different projects on Windows XP. There is an icon on my desktop for each project so all I have to do is click on the icon to open R for a specific project, i.e. a specific .RData file. How do I change to another .RData

Re: [R] Changing working directory

2007-04-23 Thread Uwe Ligges
Walter Paczkowski wrote: Good morning, I keep copies my .RData file in different directories for different projects on Windows XP. There is an icon on my desktop for each project so all I have to do is click on the icon to open R for a specific project, i.e. a specific .RData file.

Re: [R] Changing working directory

2007-04-23 Thread Bos, Roger
?setwd -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Walter Paczkowski Sent: Monday, April 23, 2007 7:41 AM To: r-help@stat.math.ethz.ch Subject: [R] Changing working directory Good morning, I keep copies my .RData file in different directories for

[R] help on xyplot and curves

2007-04-23 Thread Ronaldo Reis Junior
Hi, I need to add some different curves to a each panel in a xyplot. I have a old function to make this using panel.number, like this: panel=function(x,y,panel.number,...){ panel.xyplot(x,y,...) if(panel.number==1){

Re: [R] aggregate function

2007-04-23 Thread Gabor Grothendieck
try this. The first group of lines recreates your data frame, DF, and the last line is the aggregate: Input - DateTimez 2006-01-01 21:00 6,2 2006-01-01 22:00 5,7 2006-01-01 23:00 3,2 2006-01-02 00:00 7,8 2006-01-02 01:00 6,8 2006-01-02

Re: [R] automating merging operations from multiple dataframes

2007-04-23 Thread Vladimir Eremeev
Consider sapply and get. There might be something like the following (untested) fn-function(l){ # l is supposed to be a letter. Errors will occur otherwise. #constructing names dfr.name-paste(toupper(l),INDSLIM,sep=) column.name-paste(tolower(l),region,sep=) #retrieving data from the

Re: [R] Changing working directory

2007-04-23 Thread Prof Brian Ripley
Have you looked on the 'File' menu? 'Load Workspace...' is what you need, possibly after 'Change dir...' On Mon, 23 Apr 2007, Walter Paczkowski wrote: Good morning, I keep copies my .RData file in different directories for different projects on Windows XP. There is an icon on my desktop

Re: [R] Changing working directory

2007-04-23 Thread Petr Klasterecky
Hi, you seem to have mixed 2 different things: 1) changing a working directory - see ?setwd, ?getwd However, this will NOT load another .Rdata file. 2) loading data - see ?load and ?save, ?save.image - loading new data image will erase all currently stored objects. Petr Walter Paczkowski

Re: [R] Help on manipulating a data frame

2007-04-23 Thread Alfonso Sammassimo
Thankyou for your reply Gabor. Your code helped me get started in creating id for each week of month. What I'm really looking for though is a more general application where I can extract each final week of the month conditional on the pattern of values (simply plus or minus signs) of the

Re: [R] stringsAsFactor global option (was character coerced to a factor)

2007-04-23 Thread Terry Therneau
--- Gabor Grothendieck [EMAIL PROTECTED] wrote: Just one caveat. I personally would try to avoid using global options since it can cause conflicts when two different programs assume two different settings of the same global option and need to interact. I see this argument often, and

Re: [R] Approaches of Frailty estimation: coxme vs coxph(...frailty(id, dist='gauss'))

2007-04-23 Thread Terry Therneau
M Karim asked about the difference between coxme(..., random= ~1|id) and coxph( ... frailty(id, dist='gauss') 1. coxme is the later routine, with more sophisticated and reliable optimization, and a wider range of models. If I get the abstract done in time, there will

Re: [R] Help about princomp

2007-04-23 Thread Jari Oksanen
annina wossona at yahoo.co.uk writes: Hello, I have a problem with the princomp method, it seems stupid but I don't know how to handle it. I have a dataset with some regular data and some outliers. I want to calculate a PCA on the regular data and get the scores for all data, including

Re: [R] Random Forest

2007-04-23 Thread Jim Porzak
Rubin, I'm assuming you really do want to do a classification? check out ?factor I'm guessing you have coded MMS_ENABLED_HANDSET as 0, 1; or some such numeric coding. suggest you do: dat$MMS_ENABLED_HANDSET - factor(dat$MMS_ENABLED_HANDSET) to force your response variable to be a factor (AKA

Re: [R] Open source community help-desks

2007-04-23 Thread rolf
Ted Harding wrote: but, in the meanwhile, perhaps we need a revision of Ayn Rand's Virtue of Selfishness and how it may or may not extend to the open-source community. Ayn Rand's concept of selfishness is of course not the standard one (gratifying oneself in disregard for others), and

Re: [R] Help on manipulating a data frame

2007-04-23 Thread Gabor Grothendieck
Just change f appropriately, e.g. f - function(x) { v - embed(x$Sign, 4) %*% c(0, 1, -1, 1) == 3 if (any(v)) x[which.max(v) + 3, ] } On 4/23/07, Alfonso Sammassimo [EMAIL PROTECTED] wrote: Thankyou for your reply Gabor. Your code helped me get started in creating id for each

Re: [R] stringsAsFactor global option (was character coerced to a factor)

2007-04-23 Thread hadley wickham
A place where factors really are a pain is when the patient id is a character string. When, for instance, you subset the data to do an analysis of only the females, having the data set `remember' all of the male id's (the original levels) is non-productive in dozens of ways. For other

Re: [R] help on xyplot and curves

2007-04-23 Thread Gabor Grothendieck
See: http://finzi.psych.upenn.edu/R/Rhelp02a/archive/90294.html On 4/23/07, Ronaldo Reis Junior [EMAIL PROTECTED] wrote: Hi, I need to add some different curves to a each panel in a xyplot. I have a old function to make this using panel.number, like this:

[R] data frame

2007-04-23 Thread elyakhlifi mustapha
hello, I wanna print something like this Class Levels Values Id_TrT1 1 2 Id_Geno764208 64209 64210 64211 64212 64213 64214 Id_Rep 2 12 Is it possible? I have some problem I think taht

Re: [R] stringsAsFactor global option (was character coerced to a factor)

2007-04-23 Thread Prof Brian Ripley
On Mon, 23 Apr 2007, Terry Therneau wrote: --- Gabor Grothendieck [EMAIL PROTECTED] wrote: Just one caveat. I personally would try to avoid using global options since it can cause conflicts when two different programs assume two different settings of the same global option and need to

[R] Package installed, functional but not available

2007-04-23 Thread Fernando Mayer
Hello, when I run packageStatus(), I get the following results: packageStatus() Number of installed packages: ok upgrade unavailable /home/fernando/my_library 38 0 1 /usr/local/lib/R/library 28 0 0 Number of available

Re: [R] aggregate function

2007-04-23 Thread Michel Schnitz
it works. thanks a lot. Gabor Grothendieck wrote: try this. The first group of lines recreates your data frame, DF, and the last line is the aggregate: Input - DateTimez 2006-01-01 21:00 6,2 2006-01-01 22:00 5,7 2006-01-01 23:00 3,2 2006-01-02

Re: [R] help on xyplot and curves

2007-04-23 Thread Ronaldo Reis Junior
Em Segunda 23 Abril 2007 10:38, Gabor Grothendieck escreveu: See: http://finzi.psych.upenn.edu/R/Rhelp02a/archive/90294.html Thanks, it work. Inte Ronaldo -- As pequenas dívidas são aborrecidas como as moscas. As grandes, logicamente, deveriam ser terríveis como os leões, e são

Re: [R] data frame

2007-04-23 Thread Stefan Grosse
how about: ?str ever considered reading an introductory text? find some here: http://cran.r-project.org/other-docs.html Stefan elyakhlifi mustapha wrote: hello, I wanna print something like this Class Levels Values Id_TrT1 1 2 Id_Geno

Re: [R] Package installed, functional but not available

2007-04-23 Thread Prof Brian Ripley
If you read the help page it says Description: Summarize information about installed packages and packages available at various repositories, and automatically upgrade outdated packages. ... avail: a data frame with columns as the _matrix_ returned by

Re: [R] subset

2007-04-23 Thread Stefan Grosse
What format does your date have? This is essential here. However it must be something like subset(yourdata, year %in% 2004) how to extract the year from your date you must find out yourself... (depending on the dates format...) ever considered reading an introductory text? find some here:

[R] chi square problem

2007-04-23 Thread Daniel Fodor
Dear all, I have a problem that I could not solve neither with spss nor with R. Please, excuse me if it is atrivial question but I did not find any soultion. I have the followig practical problem: we a product that has A, B, C effects (we differentiated about 30) on

[R] regarding redirecting output of GARCH to a file

2007-04-23 Thread gyadav
Hi All R Experts I wrote this code so that all the summaries are stored in one file so that i can try to see among them which one is most fitting. but the results.txt file is having * ESTIMATION WITH ANALYTICAL GRADIENT * many times i.e. 25x25 = 625 Please help in sending the summaries

Re: [R] data frame

2007-04-23 Thread Schmitt, Corinna
You can build the data frame with: dat - data.frame(Class=I(Id_TrT1), Levels=I(1), Values=I(2)) new.info - c(Class=Id_Geno, Levels=7 , Values=64208 64209 64210 64211 64212 64213 64214) dat - rbind(dat, new.info) dat new.info - c(Class= Id_Rep , Levels=2 , Values=12) dat - rbind(dat,

[R] Bug in R 2.4.1 ?

2007-04-23 Thread Sebastian Weber
Hello everybody, I'm using hdf5 files to store results from intermediate calculations. These are usually part of a list, called res. As I want the hdf-files to contain all the members of res in its top directory, I used to do attach(res) do.call(hdf5save, args=c(fileout=file.path(dir, ofile),

[R] WG: data frame

2007-04-23 Thread Schmitt, Corinna
You can build the data frame with: dat - data.frame(Class=I(Id_TrT1), Levels=I(1), Values=I(2)) new.info - c(Class=Id_Geno, Levels=7 , Values=64208 64209 64210 64211 64212 64213 64214) dat - rbind(dat, new.info) dat new.info - c(Class= Id_Rep , Levels=2 , Values=12) dat - rbind(dat,

[R] Unsubscription Confirmation

2007-04-23 Thread Egoldsystem
Thank you for subscribing. You have now unsubscribed and no more messages will be sent. __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html

Re: [R] Bug in R 2.4.1 ?

2007-04-23 Thread Duncan Murdoch
On 4/23/2007 10:56 AM, Sebastian Weber wrote: Hello everybody, I'm using hdf5 files to store results from intermediate calculations. These are usually part of a list, called res. As I want the hdf-files to contain all the members of res in its top directory, I used to do attach(res)

Re: [R] Random Forest

2007-04-23 Thread Weiwei Shi
Hi, Ruben: fit$confusion if you provide your test data, then you can also access the confusion matrix of test data by fit$test$confusion there are details of how to use randomForest by reading: ?randomForest HTH, Weiwei On 4/22/07, Ruben Feldman [EMAIL PROTECTED] wrote: Hi, I am trying

[R] Dominance in qtl model

2007-04-23 Thread joseph powell \(RI\)
Hi, I'm using R for a QTL analysis of SNP data. I was wondering if anyone had any advice on fitting a dominance effect into the following function; myfun4 function (x) { x - scan(con, nmax=169) y - unique(x[which(!is.na(x))]) if(length(y)1) { summary(lme(Ad ~ x, random= ~1|sire,

[R] data frame

2007-04-23 Thread Schmitt, Corinna
Hallo You can build the data frame with: dat - data.frame(Class=I(Id_TrT1), Levels=I(1), Values=I(2)) new.info - c(Class=Id_Geno, Levels=7 , Values=64208 64209 64210 64211 64212 64213 64214) dat - rbind(dat, new.info) dat new.info - c(Class= Id_Rep , Levels=2 , Values=12) dat -

[R] summary and min max

2007-04-23 Thread Sebastian P. Luque
Hi, I came across a case where there's a discrepancy between minimum and maximum values reported by 'summary' and the 'min' and 'max' functions: --cut here---start- R str(tt) num [1:1397] 1952 1970 1976 1967 1946 ... R summary(tt) Min. 1st Qu.

Re: [R] data frame

2007-04-23 Thread Gabor Grothendieck
Its not usual to represent structures in this form in R but you can do it if you really want: data.frame(A = letters[1:3], B = 1:3, C = I(list(2, 1:6, 9))) Note the I (capital i) to make sure the list gets passed in asis. On 4/23/07, elyakhlifi mustapha [EMAIL PROTECTED] wrote: hello, I

Re: [R] Estimates at each iteration of optim()?

2007-04-23 Thread DEEPANKAR BASU
I read the description of the trace control parameter in ?optim and then also looked at the examples given at the end. In one of the examples I found that they had used trace=TRUE with the method SANN. I am using the method BFGS and I tried using trace=TRUE too but I did not get the parameter

Re: [R] colored shading lines

2007-04-23 Thread Greg Snow
Here are a few options (others may have better ones): 1. Don't use shading lines. These were mainly used when color/grayscale was not available and are less needed now. Also, sometimes the used of shading lines causes a Moire vibration (the combination of the lines and the physiology of the eye

Re: [R] importing sas datasets

2007-04-23 Thread [EMAIL PROTECTED]
Hi John and Daniel, Thanks for your suggestions, I updated line 127 of the sas.get function but after submitting the following command: c- sas.get(lib=c:\\ghan, mem=mkds0001, var=( ), format.library=d:\\R\\R-2.4.1, sasprog='C:\\Programmi\\SAS\\SAS 9.1\\sas.exe') (also trying with

Re: [R] Estimates at each iteration of optim()?

2007-04-23 Thread Peter Dalgaard
DEEPANKAR BASU wrote: I read the description of the trace control parameter in ?optim and then also looked at the examples given at the end. In one of the examples I found that they had used trace=TRUE with the method SANN. I am using the method BFGS and I tried using trace=TRUE too but I

[R] Documentation for namespaces

2007-04-23 Thread Terry Therneau
Brian Ripley recently replied to a comment of mine by referring to a function 'assignInNamespace', which I had not heard of. Is there a good write up on name spaces in R? There are little tidbits in the manuals on the R site, but I found nothing substative. I'd like to understand these

[R] [R-pkgs] New version of actuar

2007-04-23 Thread Vincent Goulet
UseRs, actuar is a package for Actuarial Science. A rather preliminary version (0.1-3) of the package has been available on CRAN since February 2006. We now announce the immediate availability of version 0.9-2 sporting a large number of new features. Non actuaries behold! There can be some

Re: [R] exemple pour l'AFD

2007-04-23 Thread Jean lobry
Bonjours monsieurs Je suis un ?tudient en 4eme ann?e informatique a l?universite djilali liabes SBA ALGERIE. Je suis entrain de pr?parer un expos? sur l?AFD et j?ai besoin d?un exemple sous R pour bien pr?senter mon travail. Not sure to understand your question but if by AFD you mean CDA, that is

Re: [R] Documentation for namespaces

2007-04-23 Thread Uwe Ligges
See the article Tierney, L. (2003): Name Space Management for R, R News 3 (1), 2-6. Uwe Ligges Terry Therneau wrote: Brian Ripley recently replied to a comment of mine by referring to a function 'assignInNamespace', which I had not heard of. Is there a good write up on name spaces in

Re: [R] summary and min max

2007-04-23 Thread Ben Bolker
Sebastian P. Luque spluque at gmail.com writes: Hi, I came across a case where there's a discrepancy between minimum and maximum values reported by 'summary' and the 'min' and 'max' functions: By default summary only lists 3 significant digits ... see ?summary Ben Bolker (is

Re: [R] Random Forest

2007-04-23 Thread Ron Michael
Dear all R gurus, I am really sorry if my query embraces anyone. Can anyone give me some introductory papers or suggestions about what Random Forest is? Thanks and regards, - Original Message From: Weiwei Shi [EMAIL PROTECTED] To: Ruben Feldman [EMAIL PROTECTED] Cc:

Re: [R] Estimates at each iteration of optim()?

2007-04-23 Thread Ravi Varadhan
Deepankar, Here is an example using BFGS: fr - function(x) { ## Rosenbrock Banana function + x1 - x[1] + x2 - x[2] + 100 * (x2 - x1 * x1)^2 + (1 - x1)^2 + } grr - function(x) { ## Gradient of 'fr' + x1 - x[1] + x2 - x[2] + c(-400 * x1 * (x2 - x1 * x1) - 2 * (1 - x1),

[R] residuals and predict

2007-04-23 Thread elyakhlifi mustapha
hi, in using glm function is it possible to extract residuals and predict values ? ___ [[alternative HTML version deleted]] __ R-help@stat.math.ethz.ch

Re: [R] Random Forest

2007-04-23 Thread Ron Michael
Dear all R gurus, I am really sorry if my query embraces anyone. Can anyone give me some introductory papers or suggestions about what Random Forest is? Thanks and regards, - Original Message From: Weiwei Shi [EMAIL PROTECTED] To: Ruben Feldman [EMAIL PROTECTED] Cc:

Re: [R] summary and min max

2007-04-23 Thread Mike Prager
Sebastian P. Luque [EMAIL PROTECTED] wrote: I came across a case where there's a discrepancy between minimum and maximum values reported by 'summary' and the 'min' and 'max' functions: summary() rounds by default. Thus its reporting oddball values is considered a feature, not a bug. -- Mike

Re: [R] Estimates at each iteration of optim()?

2007-04-23 Thread DEEPANKAR BASU
Ravi, Thanks a lot for your detailed reply. It clarifies many of the confusions in my mind. I want to look at the parameter estimates at each iteration because the full model that I am trying to estimate is not converging; a smaller version of the model converges but the results are quite

Re: [R] aggregate function

2007-04-23 Thread Martin Becker
If monthly should aggregate per -mm combination, you could try something like aggregate(x$z,list(cut(as.Date(x$Date),m)),mean) for monthly aggregation and aggregate(x$z,list(cut(as.Date(x$Date),y)),mean) for yearly means. If monthly aggregation should aggregate over different years

Re: [R] residuals and predict

2007-04-23 Thread Petr Klasterecky
?fitted ?residuals ?glm section 'value' Please be so kind and read the available documentation before posting... Petr elyakhlifi mustapha napsal(a): hi, in using glm function is it possible to extract residuals and predict values ?

Re: [R] extracting the mode of a vector

2007-04-23 Thread John Wilkinson
Beno?t L?t? wrote: Hello, I have an elementary question (for which I couldn't find the answer on the web or the help): how can I extract the mode (modal score) of a vector? Assuming that your vector contains only integers: v - sample(1:5, size=20, replace=T) v [1] 1 1 1 1 2 3 5 1 1 5

[R] test deviation from a binomial distribution - lack of 50:50

2007-04-23 Thread parn
Dear R-users, I have a data set where each observation consists of a number of trials (n.trials) that varies between 5 and 7, 6 being most common. Each trial can take either of two outcomes, success or failure. A dummy data set: n.trials - sample(5:7, 50, replace=T, prob=c(0.2, 0.6, 0.2))

Re: [R] residuals and predict

2007-04-23 Thread Henrique Dallazuanna
Hi, try assign the output of glm to a object. g - glm(model) names(g) -- Henrique Dallazuanna Curitiba-Paraná-Brasil 25° 25' 40 S 49° 16' 22 Ohttp://maps.google.com/maps?f=qhl=enq=Curitiba,+Brazillayer=ie=UTF8z=18ll=-25.448315,-49.276916spn=0.002054,0.005407t=kom=1 On 4/23/07, elyakhlifi

Re: [R] Random Forest

2007-04-23 Thread Jim Porzak
Google random forests see Leo Brieman's site, Wikipedia, esp link at bottom of wikipedia page to Andy Matt's article in RNews I did a DMA/AC webinar in January. Slides are at: http://www.porzak.com/JimArchive/JimPorzak_RFwithR_DMAAC_Jan07_webinar.pdf On 4/23/07, Ron Michael [EMAIL PROTECTED]

Re: [R] Estimates at each iteration of optim()?

2007-04-23 Thread Ravi Varadhan
Without knowing much about your problem, it is hard to suggest good strategies. However, if you are having trouble with the estimates of covariance matrix not being positive-definite, you can force them to be positive-definite after each iteration, before moving on to the next iteration. Look at

[R] fitting mixed models to censored data?

2007-04-23 Thread Douglas Grove
Hi, I'm trying to figure out if there are any packages allowing one to fit mixed models (or non-linear mixed models) to data that includes censoring. I've done some searching already on CRAN and through the mailing list archives, but haven't discovered anything. Since I may well have done a

Re: [R] Estimates at each iteration of optim()?

2007-04-23 Thread Prof Brian Ripley
You can of course print out the values in your objective function, as that is where you want the information. In any case, using R's debugging facilities (e.g. dump.frames debugger) would have enabled you to find the input values are which your function was failing. Please see the chapter

Re: [R] Documentation for namespaces

2007-04-23 Thread Prof Brian Ripley
http://www.stat.uiowa.edu/~luke/R/namespaces/morenames.html http://www.ci.tuwien.ac.at/Conferences/useR-2004/Keynotes/Tierney.pdf http://cran.r-project.org/doc/Rnews/Rnews_2003-1.pdf may all help, but there is as yet nothing (AFAIK) like a comprehensive user-level manual. On Mon, 23 Apr 2007,

Re: [R] fitting mixed models to censored data?

2007-04-23 Thread Bert Gunter
Douglas: AFAIK, this is subject area of active current research. Diggle, Heagerty, Liang, and Zeger , 2002, (ANALYSIS OF LONGITUDINAL DATA) say on p.316: An emerging consensus is that analysis of data with potentially informative dropouts necessarily involves assumptions which are difficult, or

Re: [R] fitting mixed models to censored data?

2007-04-23 Thread Douglas Grove
Hi Bert, Yes, I am always wary when one software offers something that other do not. The censoring I'm faced with (at present) isn't as complicated as with much 'survival' data. I'm trying to analyze assay data and have a lower limit of detection (LLD) to contend with. Once the level of the

Re: [R] Estimates at each iteration of optim()?

2007-04-23 Thread DEEPANKAR BASU
Thanks a lot for all your suggestions; they have been extremely helpful. I will work through each (starting with Ravi's suggestions) and get back with other questions if they arise. Deepankar - Original Message - From: Ravi Varadhan [EMAIL PROTECTED] Date: Monday, April 23, 2007 1:26

Re: [R] importing sas datasets

2007-04-23 Thread Daniel Nordlund
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Monday, April 23, 2007 8:45 AM To: John Kane; Daniel Nordlund; r-help@stat.math.ethz.ch Subject: Re: [R] importing sas datasets Hi John and Daniel, Thanks for your suggestions, I updated line 127 of the

[R] .RData saved on exit, but not .Rhistory?

2007-04-23 Thread Ian Davis
Apologies in advance if I've misunderstood something or this is a stupid question. When using the R on my Mac (2.4.1 and 2.3.0), if I exit and ask to save the workspace, .RData is updated but .Rhistory is not. Introduction to R makes it sound like both should be saved, and it clearly happened

[R] BlueGene - Compile R for BGL?

2007-04-23 Thread Mike Hanby
Howdy, I was just wondering if anyone out there has compiled R to run on the IBM BlueGene, and if so, could they share their compilation options / configuration? Thanks, Mike [[alternative HTML version deleted]] __

Re: [R] fitting mixed models to censored data?

2007-04-23 Thread Pikounis, Bill [CNTUS]
Doug, In perhaps similar situations where there are clusters of measurements due to repeated time or space on an individual subject or experimental unit, I have used the survreg() function from the survival library. You can specify left, right, and/or interval censoring within a data set through

  1   2   >