Re: [R] p-value for hazard ratio in Cox proportional hazards regression?

2011-12-16 Thread Joshua Wiley
After some discussion off list, I came to the conclusion that most of my statements below are erroneous. This is just an errata for the public archive to try to correct the misinformation. Josh On Sat, Dec 10, 2011 at 9:45 PM, Joshua Wiley wrote: > Hi Thierry, > > I see what you want now---a si

Re: [R] Random Forest Reading N/A's, I don't see them

2011-12-16 Thread William Dunlap
Try randomForest with a small dataset to see how it works: > d <- data.frame(stringsAsFactors=FALSE, + Num=(1:10)%%9, + Fac=factor(rep(LETTERS[1:2],each=5)), + Char=rep(letters[24:26],len=10)) > randomForest(x=d[,"Char",drop=FALSE], y=d$Num)

Re: [R] VaR package, where is it?

2011-12-16 Thread Achim Zeileis
On Fri, 16 Dec 2011, jfca283 wrote: Hi I need to perform some analysis about risk management portfolio. There is a reference to a VaR package, however, i can't find it. It was deprecated? Or it's inside now of another package? Thanks. Using the package=... syntax of the official CRAN package U

[R] VaR package, where is it?

2011-12-16 Thread jfca283
Hi I need to perform some analysis about risk management portfolio. There is a reference to a VaR package, however, i can't find it. It was deprecated? Or it's inside now of another package? Thanks. -- View this message in context: http://r.789695.n4.nabble.com/VaR-package-where-is-it-tp4206869p

Re: [R] package.skeleton()

2011-12-16 Thread Duncan Murdoch
On 11-12-16 4:12 PM, Ben Ganzfried wrote: Hi-- I'm creating an R package, I've read through "Writing R Extensions" and the package.skeleton() R page-- and I'm still running into a little confusion. I would greatly appreciate any advice you can provide. Where do I run my following line of code f

Re: [R] Random Forest Reading N/A's, I don't see them

2011-12-16 Thread David Winsemius
On Dec 15, 2011, at 2:39 PM, Lost in R wrote: After checking the original data in Excel for blanks and running Summary(cm3) to identify any null values in my data, I'm unable to identify an instances. Yet when I attempted to use the data in Random Forest, I get the following error. Is ther

Re: [R] Random Forest Reading N/A's, I don't see them

2011-12-16 Thread Lost in R
The data set I attached was just those 10 lines. It was only meant to show any possible obvious mistake I may have made. The real set has the 4498 line of data. -- View this message in context: http://r.789695.n4.nabble.com/Random-Forest-Reading-N-A-s-I-don-t-see-them-tp4201546p4206630.html Sent

Re: [R] simulation

2011-12-16 Thread Bert Gunter
Suggestions? -- Yes. 1) Wrong list.. Post on R-sig-mixed-models, not here. 2) Follow the posting guide and provide the modelformula, which may well be the source of the difficulties (overfitting). -- Bert On Fri, Dec 16, 2011 at 1:56 PM, Scott Raynaud wrote: > I'm using an R program (which I d

Re: [R] Fortune? -- was Re: optim with simulated annealing SANN ...

2011-12-16 Thread Achim Zeileis
On Fri, 16 Dec 2011, Bert Gunter wrote: Folks: I thought John Nash's comment below was profound and a possible Fortunes candidate: (Aside: I believe it applies to a great deal of what is discussed on this list, not just stochastic optimization.) Thanks for the pointer, very true indeed - and

[R] simulation

2011-12-16 Thread Scott Raynaud
I'm using an R program (which I did not write) to simulate multilevel data (subjects in locations) used in power calculations. It uses lmer to fit a mixed logistic model to the simulated data based on inputs of means, variances, slopes and proportions:   (fitmodel <- lmer(modelformula,data,famil

[R] Fortune? -- was Re: optim with simulated annealing SANN ...

2011-12-16 Thread Bert Gunter
Folks: I thought John Nash's comment below was profound and a possible Fortunes candidate: (Aside: I believe it applies to a great deal of what is discussed on this list, not just stochastic optimization.) Cheers, Bert ... (in the context of stochastic optimization) >... As with many tools in t

Re: [R] Random Forest Reading N/A's, I don't see them

2011-12-16 Thread David Winsemius
On Dec 16, 2011, at 12:20 PM, Lost in R wrote: I've also attached here a sample of my data in Excel. I'm thinking it It? What is "it"? must be a problem with a character, but can't figure it out. Is there a list somewhere of characters to avoid in R? Thanks, Mike http://r.789695.n4.nabble

Re: [R] Random Forest Reading N/A's, I don't see them

2011-12-16 Thread jim holtman
What exactly is your problem with this file? The file that you sent had 10 lines of what appeared to be data and 4489 lines with just commas which would read in as NAs. When you do an 'str' you get: > str(x) 'data.frame': 4498 obs. of 195 variables: $ Good_Bad : Factor w/ 3

[R] Fw: crash in using Rcpp and inline packages.

2011-12-16 Thread Guochun Shen
Hi all, I am using c++ functions in R by Rcpp and inline packages. The code is quite simple, but the R session always automatically crash after some running time. Does anyone here familiar with Rcpp and inline? What¡¯s the problem in the following code? I have checked the input values, no NA an

[R] crash in using Rcpp and inline packages.

2011-12-16 Thread Guochun Shen
Hi all, I am using c++ functions in R by Rcpp and inline packages. The code is quite simple, but the R session always automatically crash after some running time. Does anyone here familiar with Rcpp and inline? What¡¯s the problem in the following code? I have checked the input values, no NA an

Re: [R] package.skeleton()

2011-12-16 Thread Ben Ganzfried
*the line in question is*: > package.skeleton(name = "a", code_files = "EsetObject.r") On Fri, Dec 16, 2011 at 4:12 PM, Ben Ganzfried < benganzfr...@post.harvard.edu> wrote: > Hi-- > > I'm creating an R package, I've read through "Writing R Extensions" and > the package.skeleton() R page-- and I'

[R] package.skeleton()

2011-12-16 Thread Ben Ganzfried
Hi-- I'm creating an R package, I've read through "Writing R Extensions" and the package.skeleton() R page-- and I'm still running into a little confusion. I would greatly appreciate any advice you can provide. Where do I run my following line of code from?: > package.skeleton(name = "a", code_fi

Re: [R] Random Forest Reading N/A's, I don't see them

2011-12-16 Thread Lost in R
I've also attached here a sample of my data in Excel. I'm thinking it must be a problem with a character, but can't figure it out. Is there a list somewhere of characters to avoid in R? Thanks, Mike http://r.789695.n4.nabble.com/file/n4205479/Sample_Data_Set.csv Sample_Data_Set.csv -- View this

[R] Zellig Error Message

2011-12-16 Thread Abraham Mathew
I'm trying to calculate predicted probabilities in R with Zelig and keep getting the following error. Can anyone help? > x.low <- setx(mod, type=1)Error in dta[complete.cases(mf), names(dta) %in% > vars, drop = FALSE] : incorrect number of dimensions When I ran the model, I ran everything b

Re: [R] Multiple plots in one subplot

2011-12-16 Thread Greg Snow
Look at the layout function, it may do what you want. -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare greg.s...@imail.org 801.408.8111 > -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-bounces@r- > project.org] On Behalf Of annek >

Re: [R] removing contractions for recode in car

2011-12-16 Thread Nicole Marie Ford
I see the problem. So Sorry. - Original Message - From: "Nicole Marie Ford" To: "John Fox" Cc: r-help@r-project.org Sent: Friday, December 16, 2011 11:54:36 AM Subject: Re: [R] removing contractions for recode in car Hello, all. I am encountering a new problem I have not seen before

Re: [R] removing contractions for recode in car

2011-12-16 Thread Nicole Marie Ford
Hello, all. I am encountering a new problem I have not seen before. I recoded my variable trust in the following manner (thank you John and David): trust <- recode(Poland$SN35B, " 'Strongly Agree' = 1; 'Agree' = 2; 'Neither Agree nor Disagree' = 3; 'Disagree' = 4; 'Strongly Disagree' = 5; \"Can

Re: [R] Model design

2011-12-16 Thread ONKELINX, Thierry
Dear Alfreda, I'm not suggesting to use ANOVA but to look at the anova table of your gls model. You can get that with anova(your.model). Thierry Van: alfreda morinez [alfredamori...@gmail.com] Verzonden: vrijdag 16 december 2011 15:29 Aan: ONKELINX, Thie

Re: [R] nls start values

2011-12-16 Thread Nick Fankhauser
Hi! thanks a lot for this suggestion! I tried to implement it like this, and it worked nicely. I used the method suggested by Gabor Grothendieck for simplification: frml <- gene_expression ~ sin(tpoints * afreq + phase) * amp + shift gridfit <- nls2(frml, algorithm = "grid-search", data=gendat, s

[R] odfWeave

2011-12-16 Thread Frank Lawrence
I am new to using odfWeave but I have encountered a problem running both the example in the help file as well as another file. I am not sure how to correct the error. First example: library(odfWeave) filein <- 'c:\\my documents\\example01_in.odt' fileout <- 'c:\\my documents\\example01.odt'

Re: [R] kmeans and plot labels

2011-12-16 Thread Meesters, Christian
Hi, You are right - I promise improvement of my way to ask. Anyhow, thanks to your comparisons I got much better insight in the way plotting environments can be altered - and have my solution. Thank you. Christian From: Sarah Goslee [sarah.gos...@gmail.c

[R] optim with simulated annealing SANN for combinatorial optimization

2011-12-16 Thread John C Nash
A particularly unfortunate aspect of "SANN" in optim() is that it will evaluate the objective function 'maxit' times and quit with conv=0, implying it has "converged". The Rd file points out a number of departures of SANN from the other optimizers, but a key one is that it does NOT return a res

Re: [R] kmeans and plot labels

2011-12-16 Thread Sarah Goslee
Hi, You include no context, and I only vaguely remember your original question. You also don't include a reproducible example. But perhaps this helps? testmat <- data.frame(x=c(1,1,2,3), y=c(2,1,3,2), names=letters[1:4], stringsAsFactors=FALSE) with(testmat, plot(x, y, pch=names)) or with(test

Re: [R] Model design

2011-12-16 Thread alfreda morinez
Hi Thierry I looked at running an ANOVA but I have spatial autocorrelation in the data set as indicated by Variograms and significant moran's I i.e the cells closer together are more likely to be similar than expected under a normal distibution - is it possible to make this approach take it into c

Re: [R] Model design

2011-12-16 Thread ONKELINX, Thierry
Dear Alfreda, anova(area_grass) will tell you IF the average grass area is different among areas. If you want to know WHICH areas are different from each other, then you have to do some multiple comparisons. You can use the multcomp package: e.g. library(multcomp) glht(area_grass, linfct = mc

Re: [R] mgcv 1.7-12 crashes R

2011-12-16 Thread Kevin E. Thorpe
On 12/16/2011 08:52 AM, Reinhard Seifert wrote: Dear community, I encountered a very disturbing phenomenon today: When I try to fit any gam() with mgcv R aborts. I could not find any post regarding this in google, which mades in even more strange. I am using the latest Ubuntu, latest R and lat

Re: [R] Data Manipulation - make diagonal matrix of each element of a matrix

2011-12-16 Thread Clemontina Alexander
Thank you, that is much simpler! On Thu, Dec 15, 2011 at 2:04 PM, Rui Barradas wrote: > Hello, > > I believe I can help, or at least, my code is simpler. > First, look at your first line: > > idd <- length(diag(1,tt))   # length of intercept matrix > # > not needed: diag(tt) would do the job bu

[R] mgcv 1.7-12 crashes R

2011-12-16 Thread Reinhard Seifert
Dear community, I encountered a very disturbing phenomenon today: When I try to fit any gam() with mgcv R aborts. I could not find any post regarding this in google, which mades in even more strange. I am using the latest Ubuntu, latest R and latest mgcv everything up to date. The crash occured

[R] Model design

2011-12-16 Thread alfreda morinez
Dear List, I am realtively inexperienced so i apologise in advance and ask for understanding in the simplicity of my question: I have data on the amount of grass per km in a cell ( of which i have lots) "grass" and for each cell i have x/y coordinates - required due to spatial autocorrelation Ce

Re: [R] main title in plot; outer=TRUE (cut off)

2011-12-16 Thread jim holtman
Also try adding 'line = -1' and adjusting for the proper position. title(outer=TRUE,adj=0,main = list("1 a)", cex=1.1,col="black", font=2), line = -1) On Fri, Dec 16, 2011 at 8:44 AM, jim holtman wrote: > try moving the 'par' function call before the plot; you need to have > the margins set befo

Re: [R] main title in plot; outer=TRUE (cut off)

2011-12-16 Thread jim holtman
try moving the 'par' function call before the plot; you need to have the margins set before you do the 'plot'ting. Also not reproducible since 'data' not provided. On Fri, Dec 16, 2011 at 5:25 AM, AlexC wrote: > Hello, > > I'm trying to position a plot title "1 a)" in the top left corner of a >

Re: [R] Multicollinearty in logistic regression models

2011-12-16 Thread Liviu Andronic
On Fri, Dec 16, 2011 at 1:47 PM, David Winsemius wrote: > Harrell's rms package has a vif function that is intended for use with fits > from his logistic regression model function, lrm. This uses the variance > Also see vif() in 'car'. Liviu __ R-help@

[R] main title in plot; outer=TRUE (cut off)

2011-12-16 Thread AlexC
Hello, I'm trying to position a plot title "1 a)" in the top left corner of a graph; i've set outer=TRUE for it to be in the outer margin unfortunately this is cut off. Is there a way either to make it so that it is not cut off or increase the number of margins and then place it in margin below

Re: [R] Calculate AUC Using the Trapezoidal Method

2011-12-16 Thread arivald
Thx! -- View this message in context: http://r.789695.n4.nabble.com/Calculate-AUC-Using-the-Trapezoidal-Method-tp4200049p4203947.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list https://stat.ethz.ch/mai

Re: [R] Improve a browse through list items - Transform a loop to apply-able function.

2011-12-16 Thread Robin Cura
Thanks to all of you for those answers, it now works and it's way faster than it used to be ;) Especially, converting my list of matrix to a 3-dimensionnal array simplifies a lot the statistics I have to run on my data :) Thanks again, Robin 2011/12/14 Patrizio Frederic > Hi robin, > I'm not s

[R] Error constructing probabilities in Zelig

2011-12-16 Thread Abraham Mathew
I've run an ordered logistic regression model in R with Zelig and am looking to calculate predicted probabilities. Zelig has a series of simple one line commands to generate the information I want on first differences and so forth. Unfortunately, I keep getting an error when running the zelig funct

Re: [R] kmeans and plot labels

2011-12-16 Thread Meesters, Christian
Hi, Thanks Sarah. Unfortunately I did not get a step further. My question, perhaps a bit clearer, is how to display the case control status (or any other arbitrary point label) after clustering in a plot: With a bit of pseudo code, where dataset is a data.frame, parameters are those column nam

Re: [R] Multicollinearty in logistic regression models

2011-12-16 Thread David Winsemius
On Dec 15, 2011, at 7:41 PM, wrote: David Winsemius writes: On Dec 15, 2011, at 11:34 AM, Mohamed Lajnef wrote: Dear All, Is there a method to diagnostic multicollinearty in logistic regression models like vif indicator in linear regression ( variance inflation Factor ...) ? Wouldn't

[R] (no subject)

2011-12-16 Thread Kristi Shoemaker
...Lose weight without diets. http://www.compratusaldo.com/page.december.php?gID=73uc5 __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and pr

Re: [R] Odp: Multiple plots in one subplot

2011-12-16 Thread Walmes Zeviani
You can use a different way of split the plotting area that is by means of layout() function. x <- rnorm(100) M <- matrix(c(rep(1:5, e=2), 6, 7), byrow=TRUE, nrow=2) layout(M) plot(x) hist(x) qqnorm(x) boxplot(x) plot(density(x)) plot(abs(x)) hist(abs(x)) Bests. Walmes. =

[R] problem with tick graph

2011-12-16 Thread n.via...@libero.it
Dear all, I'm having problems with the tick of my graph. I'mpcombining lines and barplot. For my I'm using the function axis combined with the function pretty to have more efficient tick, but all my tick (for example, 300 as my max tick and -100 as my min tick) are not printed on my graph. So I

Re: [R] .nc files query

2011-12-16 Thread Prof Brian Ripley
On 16/12/2011 02:19, vaish wrote: Hello Everyone, I have tried using open.ncdf(con,..) to open .nc files in R, but somehow, its showing that R could not find function open.ncdf. I am new to R, please help me out with this. Yet somewhere you found a reference to open.ncdf -- a pretty arcane fun

Re: [R] modify the name of axis of an R function

2011-12-16 Thread Martin Maechler
> David Winsemius > on Thu, 15 Dec 2011 09:56:31 -0500 writes: > On Dec 15, 2011, at 1:53 AM, plocq wrote: >> Hi, >> >> I use the function fpot of packages evd. If I call the >> fit that I obtain "fit", I want to modify the name of the >> axis and the main ti

Re: [R] Event handling in R

2011-12-16 Thread Henrik Bengtsson
...because you're catching the timeout error with try() so it has not effect, and hence the while(TRUE) {} loop keeps running. Without knowing anything about graphics event handlers per se, here's an alternative to catch the timeout event: library("R.utils"); plot(0, 0); eventEnv <- getGraphicsE

[R] Odp: Multiple plots in one subplot

2011-12-16 Thread Petr PIKAL
Hi > > Hi, > I making a figure with six sub-plots using par(mfcol=c(2,3)). In the last > sub-plot I want to have two graphs instead of one. I have tried using > par(fig=x,y,z,v) but this par seems to overwrite the first par. Is there a > simple solution? You can try ?layout or grid graphic. T

Re: [R] Multiple plots in one subplot

2011-12-16 Thread Rolf Turner
On 16/12/11 19:36, annek wrote: Hi, I making a figure with six sub-plots using par(mfcol=c(2,3)). In the last sub-plot I want to have two graphs instead of one. I have tried using par(fig=x,y,z,v) but this par seems to overwrite the first par. Is there a simple solution? If I understand you corre

[R] Multiple plots in one subplot

2011-12-16 Thread annek
Hi, I making a figure with six sub-plots using par(mfcol=c(2,3)). In the last sub-plot I want to have two graphs instead of one. I have tried using par(fig=x,y,z,v) but this par seems to overwrite the first par. Is there a simple solution? Thanks! Anna -- View this message in context: http://r

[R] Event handling in R

2011-12-16 Thread beetonn
Dear R-helpers, I've just started playing with getGraphicsEvent() in R, and was wondering if there is a simple way to stop this function waiting for input after a pre-defined time, instead of relying either on a non-NULL value from one of the event handlers or for a user-interrupt for it to ha