[R] Steepest Ascent Algorithm

2013-03-10 Thread Ricky Corp
I am trying to code a steepest ascent algorithm to optimize parameters used in a survivor function type problem. My unknown parameters (alpha, Beta0, and Beta1) for which I have been able to optimize using Newton's method. I keep getting an error because my alpha becomes negative and I can't

[R] kruskal test

2013-03-10 Thread Adriana Škrinárová
Hi I need to test scores from questionnaires ADDQoL by age group by Kruskal test. But he wrote me: kruskal.test (wis1 ~ vekkat) Error in kruskal.test.default (c (-2, -4, 0, -1, -1, -3, 0, -4, 0, -1, 0,: all group levels must be finite Vekkat is as.factor and wis1 is as.nuemric How to remove

[R] Fw: message

2013-03-10 Thread Benjamin Modra
http://www.cattechneering.com/srr/wahbw/cw/hai/cckdf/yt/ov.swe [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide

Re: [R] kruskal test

2013-03-10 Thread Rui Barradas
Hello, That error occurs if you have Inf values in vekkat. Try to see them with finite - is.finite(vekkat) sum(!finite) If this is not zero, you can fix your test with kruskal.test(wis1[finite] ~ vekkat[finite]) Hope this helps, Rui Barradas Em 10-03-2013 10:37, Adriana Škrinárová

Re: [R] grouping followed by finding frequent patterns in R

2013-03-10 Thread Bert Gunter
1.Please cc to the list, as I have here, unless your comments are off topic. 2. Use dput() (?dput) to include **small** amounts of data in your message, as attachments are generally stripped from r-help. 3. I have no experience with itemsets or the arules package, but a quick glance at the docs

Re: [R] R GUI frond has stopped working

2013-03-10 Thread Uwe Ligges
On 09.03.2013 22:06, Jeff Newmiller wrote: I have found life to be considerably simpler since I have stopped using Run-As-Administrator. If you use it at any point with R, various files throughout your filesystem become accessible only when you use RAA again... it is like heroin... use

[R] Editing figure without re-running the plotting code?

2013-03-10 Thread Sherri Heck
Dear all, I am curious if anyone knows of a command/program that would enable one to edit a figure in R once it is created (akin to Matlab). Currently, if I need to make any changes to the figure I do so and then have to run the plotting portion of the code again. I have searched the R site

[R] Error with grad() for numerical differential of a function

2013-03-10 Thread Oleguer Plana Ripoll
Hello everyone, I have programmed a function and, among other things, it has to compute the differential of a function. I have been using the function grad() and I have programmed some simulated studies. I have testes with 72,576 different combinations of the initial values and now I got an

Re: [R] rainbow producing colors that do not differ sufficiently

2013-03-10 Thread Uwe Ligges
See the CRAN task view on Graphics and its section on colors: http://cran.r-project.org/web/views/Graphics.html Uwe Ligges On 06.03.2013 18:09, Fisher Dennis wrote: R 2.15.2 OS X Colleagues, I often use rainbow to select colors. I encountered a surprise with rainbow(11). It yielded

Re: [R] Error with grad() for numerical differential of a function

2013-03-10 Thread Berend Hasselman
On 10-03-2013, at 16:43, Oleguer Plana Ripoll oleguerpl...@gmail.com wrote: Hello everyone, I have programmed a function and, among other things, it has to compute the differential of a function. I have been using the function grad() and I have programmed some simulated studies. I have

Re: [R] R GUI frond has stopped working

2013-03-10 Thread Jeff Newmiller
But updating the system R library is not necessary unless you are managing a multi-user system. Just update your personal library. I used to do a two-phase update where I updated my personal libraries and then ran R as administrator just for the purpose of updating the system library. However,

[R] Cluster analysis in the setting of repeated measures

2013-03-10 Thread John Sorkin
Does R have any function for performing cluster analysis when each subject contributes more than one observation to the analysis, i.e. a repeated measures cluster analysis? I prefer an agglomerative clustering, but would certainly be happy with a K-mean or other clustering technique. To the

Re: [R] Editing figure without re-running the plotting code?

2013-03-10 Thread Jeff Newmiller
The normal method is to rerun the code. If you use the ggplot2 library you can store plots in variables and modify them, but you still have to print them again when you want to see the results. --- Jeff Newmiller

[R] R for Card Game Modeling

2013-03-10 Thread Lorenzo Isella
Dear All, Unfortunately, I cannot come up with a script or a concrete example at this stage. I am trying to investigate statistically a card game (not a game like poker, but something more like Magic). There are various kinds of cards (agents, missions, victory points) each obeying a given

Re: [R] R for Card Game Modeling

2013-03-10 Thread Peter Ehlers
On 2013-03-10 10:49, Lorenzo Isella wrote: Dear All, Unfortunately, I cannot come up with a script or a concrete example at this stage. I am trying to investigate statistically a card game (not a game like poker, but something more like Magic). There are various kinds of cards (agents, missions,

Re: [R] (no subject)

2013-03-10 Thread Thomas Lumley
On Thu, Mar 7, 2013 at 6:36 PM, Peter Maclean pmaclean2...@yahoo.comwrote: Is there a R package that use sampling weights in multilevel modeling? The survey package does not handle multilevel modeling and the weight option in lmer and nlmer functions from lme4 (used for multilevel modeling) is

[R] Confirmatory Factor Analysis

2013-03-10 Thread Pablo Menese
Hi, I'm trying to perform a hierachical, second order CFA. That's the thing that I need to leave AMOS. I found some sim.hierarchical and omega stuff, but nothing clear enough. Can anyone help me? I just need a simple and clear manual. Best, Pablo. [[alternative HTML version deleted]]

Re: [R] EEG data for time series

2013-03-10 Thread Ben Bolker
Bert Gunter gunter.berton at gene.com writes: (Sorry, failed to cc the list) On Sat, Mar 9, 2013 at 10:11 PM, Bert Gunter bgunter at gene.com wrote: [snip] But quoting George Box (from a long time ago) on the same sort of query for a much different problem: Well, of course the

Re: [R] Confirmatory Factor Analysis

2013-03-10 Thread John Fox
Dear Pablo, The sem() function in the sem package can do second-order CFA. See the Thurstone example in ?sem. You could also use the lavaan or OpenMx packages (the latter not on CRAN). I hope this helps, John -Original Message- From: r-help-boun...@r-project.org

Re: [R] Editing figure without re-running the plotting code?

2013-03-10 Thread Jim Lemon
On 03/11/2013 02:19 AM, Sherri Heck wrote: Dear all, I am curious if anyone knows of a command/program that would enable one to edit a figure in R once it is created (akin to Matlab). Currently, if I need to make any changes to the figure I do so and then have to run the plotting portion of

Re: [R] EEG data for time series

2013-03-10 Thread Bert Gunter
Ben: My recollection is that it was an answer to a question he received from the audience at a (JSM? Gordon Conference? Other ...?) presentation. For obvious reasons, it stuck with me, but I can't do better than that. I'm pretty sure it was in the mid to late 1990's when John Tukey was still

Re: [R] Editing figure without re-running the plotting code?

2013-03-10 Thread Bert Gunter
Jim: Whoaaa... this is only true for base graphics! For grid graphics -- on which both lattice and ggplot are built -- there is a defined object structure for graphics complete with extensive editing capabilities. See, e.g. ?grid.edit in the grid package. Both lattice and ggplot can and do

Re: [R] EEG data for time series

2013-03-10 Thread Roy Mendelssohn - NOAA Federal
Hi Erin: On Mar 9, 2013, at 7:36 PM, Erin Hodgess erinm.hodg...@gmail.com wrote: Dear R People: I have a data set with EEG data. There are 128 measurements per second for 16 locations. What is the best way to handle these series, please? Thanks, Erin I don't know about best, but

[R] How to obtain the original indices of elements after sorting

2013-03-10 Thread Jie
Dear All, Suppose I have a vector X = (x_1, x_2, , x_n), X_sort = sort(X) = (x_(1), x_(2), ... , x(n) ), and I would like to know the original position of these ordered x_(i) in X, how can I do it? case 1: all values are unique x - c( 3, 5, 4, 6) x.sort - sort(x) # # I would like to obtain

Re: [R] How to obtain the original indices of elements after sorting

2013-03-10 Thread Rolf Turner
?order cheers, Rolf Turner On 03/11/2013 02:24 PM, Jie wrote: Dear All, Suppose I have a vector X = (x_1, x_2, , x_n), X_sort = sort(X) = (x_(1), x_(2), ... , x(n) ), and I would like to know the original position of these ordered x_(i) in X, how can I do it? case 1: all

Re: [R] How to obtain the original indices of elements after sorting

2013-03-10 Thread Pascal Oettli
Hi, The answer to your question is written on the help page. ?sort HTH, Pascal On 11/03/13 10:24, Jie wrote: Dear All, Suppose I have a vector X = (x_1, x_2, , x_n), X_sort = sort(X) = (x_(1), x_(2), ... , x(n) ), and I would like to know the original position of these ordered x_(i)

[R] how to convert a data.frame to tree structure object such as dendrogram

2013-03-10 Thread Not To Miss
I have a data.frame object like: data.frame(x=c('A','A','B','B'), y=c('Ab','Ac','Ba','Bd')) x y 1 A Ab 2 A Ac 3 B Ba 4 B Bd how could I create a tree structure object like this: |---Ab A---| _| |---Ac | | |---Ba B---| |---Bb Thanks, Zech [[alternative HTML version

Re: [R] R for Card Game Modeling

2013-03-10 Thread C.H.
One approach is to build an agent to play the game repeatably and then calculate the winning odds if a particular card is played. The logical first step is to implement a playable version of the game using R. http://www.personeel.unimaas.nl/g-chaslot/papers/ACGSzitaChaslotSpronck.pdf On Mon,