Re: [R] Calculate external validation

2013-12-04 Thread David Winsemius
On Dec 3, 2013, at 12:45 PM, Juan Manuel Reyes S wrote: Dear R-project I could not validate one logistic model because when I used the function lrm.fit of the package rms the program showed a error message. It said that the variable Clam and offset must have same length. Giving arguments

Re: [R] Problems with intersections between two charcter vectors

2013-12-04 Thread Jim Holtman
the vectors in you first example look like a long character string since I only see quote marks at the beginning and end and notbon the individual objects, but it is hard to tell since it appears to be in HTML. Sent from my iPad On Dec 4, 2013, at 1:52, snow 7146...@qq.com wrote: I'm a

Re: [R] Problems with intersections between two charcter vectors

2013-12-04 Thread Berend Hasselman
On 04-12-2013, at 07:52, snow 7146...@qq.com wrote: I'm a beginner with R. I have two vectors in character format. I tried to get the intersection of these two vectors using intersect(). But there is no result. The process is below: a-c(CREB2” ,“ELK1” ,“ELK4” ,“MYC” ,“NR4A1” ,“FOS”

Re: [R] significance of random effect in mgcv gam

2013-12-04 Thread Simon Wood
Question. Am I correct that p = .126 above can be taken as the p-value associated with the random effect? - Yes. See http://biomet.oxfordjournals.org/content/100/4/1005.abstract for details of the approximate test used. On 03/12/13 20:09, William Shadish wrote: Dear R-helpers, I would

[R] Self-starting nonlinear power law function

2013-12-04 Thread Scherber, Christoph
Dear all, Has anyone written a self-starting power law function of the form mypower=function(x,a,b,c){a+b*x^c} ? Or is there a nonlinear regression package containing more selfStart() functions than nlme? Thank you very much for your help! Best wishes Christoph [running R 3.0.1 on Windows

[R] httpuv_1.2.0 : websockets-hybi03.cpp

2013-12-04 Thread MAYER Hans
Dear All, I tried to compile httpuv_1.2.0 and got a lot of errors. See below. Compiling 1.0.6.3 was successful, but I need the latest version for shiny. Any ideas how to fix this cpp-file problem ? Kind regards Hans # R CMD INSTALL . * installing to library '/usr/local/lib/R/library' *

Re: [R] interaction plot with SE bar

2013-12-04 Thread Gerrit Eichner
Hi, Kristi, I have adapted the interaction plot example of function panel.average() of the lattice package and modified the code of panel.average() to a new function panel.loc_and_scale(). See below. (There might be a much simpler solution, though.) Remark on the side: I can't resist to

[R] reply: Problems with intersections between two charcter vectors

2013-12-04 Thread snow
Dec 04, 2013; 4:14pm Berend Hasselmanb...@xs4all.nl wrote: On 04-12-2013, at 07:52, snow [hidden email] wrote: I'm a beginner with R. I have two vectors in character format. I tried to get the intersection of these two vectors using intersect(). But there is no result. The process is

Re: [R] Self-starting nonlinear power law function

2013-12-04 Thread Scherber, Christoph
Dear all, I have just written the self-starting power law function myself. Here it is: ## # Self-starting power law function written by C. Scherber powermodel=function(x,a,b,c) {a+b*x^c} powermodelInit=function(mCall,LHS,data){ xy=sortedXyData(mCall[[x]],LHS,data) lmFit1=lm(xy[,y]~1) #for

Re: [R] Calculate Adjusted vcov Matrix acc. to Shanken(1992) (Generated Regressor Problem)

2013-12-04 Thread Philipp Grueber
Dear R Users, please find attached what I believe to be the solution to my problem. Note that I am still not 100% sure if my approach really does what it is intended to do and if it is applicable to my case at all. Any comment or correction is highly appreciated. Best wishes, Philipp

[R] Variable importance - ANN

2013-12-04 Thread Giulia Di Lauro
Hi everybody, I created a neural network for a regression analysis with package ANN, but now I need to know which is the significance of each predictor variable in explaining the dependent variable. I thought to analyze the weight, but I don't know how to do it. Thanks in advance, Giulia Di

Re: [R] how to replace a text in a table by another text in R?

2013-12-04 Thread arun
Hi Kristi, No problem. Try: library(stringr) dat1[,1] - factor(str_trim(dat1[,1]),labels=paste0(c(4,2,6,7,1,5,3),  levels(factor(str_trim(dat1[,1] )  dat1[,1] # [1] 1south 2north 3west  4east  1south 2north    # [7] 5southeast 4east  6northeast 7northwest 1south

[R] 3D Strip Packing and R

2013-12-04 Thread Lorenzo Isella
Dear All, I am struggling with a 3D Strip Packing problem. Briefly: you have a set of boxes (cuboids of variable sizes) that you want to put inside a (large) container of finite width and length (which are larger than those of any of the boxes) and infinite depth. The goal is to minimize the

Re: [R] significance of random effect in mgcv gam

2013-12-04 Thread William Shadish
Thank you, Simon. On 12/4/2013 1:02 AM, Simon Wood wrote: Question. Am I correct that p = .126 above can be taken as the p-value associated with the random effect? - Yes. See http://biomet.oxfordjournals.org/content/100/4/1005.abstract for details of the approximate test used. On

Re: [R] Variable importance - ANN

2013-12-04 Thread Liaw, Andy
You can try something like this: http://pubs.acs.org/doi/abs/10.1021/ci050022a Basically similar idea to what is done in random forests: permute predictor variable one at a time and see how much that degrades prediction performance. Cheers, Andy -Original Message- From:

[R] How to generate a smoothed surface for a three dimensional dataset?

2013-12-04 Thread Jun Shen
Hi, I have a dataset with two independent variables (x, y) and a response variable (z). I was hoping to generate a response surface by plotting x, y, z on a three dimensional plot. I can plot the data with rgl.points(x, y, z). I understand I may not have enough data to generate a surface. Is

Re: [R] How to generate a smoothed surface for a three dimensional dataset?

2013-12-04 Thread Federico Andreis
Hi Jun, I'd for a local fitting by means of the loess() function. Assuming z is the third axis: x-runif(25) y-runif(25) z-runif(25) xyz.fit - loess(z~x+y,control=loess.control(surface='direct'),span=.5,degree=1) #tune parameters as you like z.predict -matrix(predict(xyz.fit,cbind(x,y)),5,5)

Re: [R] How to generate a smoothed surface for a three dimensional dataset?

2013-12-04 Thread Duncan Murdoch
On 04/12/2013 11:36 AM, Jun Shen wrote: Hi, I have a dataset with two independent variables (x, y) and a response variable (z). I was hoping to generate a response surface by plotting x, y, z on a three dimensional plot. I can plot the data with rgl.points(x, y, z). I understand I may not have

[R] R survAUC Package

2013-12-04 Thread kevinod
I have a concern about the survAUC package option AUC.cd. I am exploring package functionality, specifically AUC statistics for Cox Regression, for a small academic project When utilizing this package on the ovarian data set within that package I obtain an AUC statistic of 0.3322928. When AUC

Re: [R] How to generate a smoothed surface for a three dimensional dataset?

2013-12-04 Thread Duncan Murdoch
On 04/12/2013 1:30 PM, David Winsemius wrote: On Dec 4, 2013, at 8:56 AM, Duncan Murdoch wrote: On 04/12/2013 11:36 AM, Jun Shen wrote: Hi, I have a dataset with two independent variables (x, y) and a response variable (z). I was hoping to generate a response surface by plotting x, y, z

[R] Repeated me

2013-12-04 Thread Vicent Giner-Bosch
[ I've also sent this message to other lists. Sorry for multiple messaging ] Dear colleagues, I want to perform a repeated measures two-way ANOVA (two fixed crossed factors). I've found the way to do it (in SPSS, and also in R), but anyway I think my data don't meet the requirements for that

Re: [R] Repeated me

2013-12-04 Thread Jeff Newmiller
a) Cross posting is not something to apologize for... it is something to not do. b) This message is off topic here. Please read the Posting Guide mentioned in the footer of this or any other any R-help message before posting here again.

[R] R course in Boston December 19-20

2013-12-04 Thread el...@xlsolutions-corp.com
XLSolutions R course in Boston December 19-20. Please email me for registration. Check out other cities at http://www.xlsolutions-corp.com/courselistlisting.aspx Ask for group discount and reserve your seat Now - Earlybird Rates. Payment due after the class! Email Sue Turner: sue at

[R] Double Infinite Integration

2013-12-04 Thread Aya Anas
Hello all, I need to perform the following integration where the integrand is the product of three functions: f(x)g(y)z(x,y) the limits of x are(0,inf) and the limits of y are(-inf,inf). Could this be done using R? I tried using the function integrate 2 times, but it didn't work: z-

Re: [R] How to generate a smoothed surface for a three dimensional dataset?

2013-12-04 Thread David Winsemius
On Dec 4, 2013, at 8:56 AM, Duncan Murdoch wrote: On 04/12/2013 11:36 AM, Jun Shen wrote: Hi, I have a dataset with two independent variables (x, y) and a response variable (z). I was hoping to generate a response surface by plotting x, y, z on a three dimensional plot. I can plot the

Re: [R] How to generate a smoothed surface for a three dimensional dataset?

2013-12-04 Thread Bert Gunter
... or, more simply lm(z ~ polym(x,y, degree=2) ) ?polym Cheers, Bert On Wed, Dec 4, 2013 at 10:30 AM, David Winsemius dwinsem...@comcast.net wrote: On Dec 4, 2013, at 8:56 AM, Duncan Murdoch wrote: On 04/12/2013 11:36 AM, Jun Shen wrote: Hi, I have a dataset with two independent

Re: [R] predict.arfima

2013-12-04 Thread Rolf Turner
?RSiteSearch cheers, Rolf Turner On 12/05/13 03:22, Iman Chambari wrote: hi all, i have a question about R this code for me not work: predict.arfima(x) error: could not find function predict.arfima i test other same code that error again : pred.arfima predict.arima pred.arima i

Re: [R] ggplot2 font size and bold

2013-12-04 Thread arun
Try:  theme(axis.title=element_text(face=bold,size=14,color=brown),axis.text=element_text(size=14,face=bold)) A.K. How can I increase the size and make bold of the items named under outcome in the example data set? I can make changes to label outcome, but not to individual

[R] mgcv gam modeling trend variation over cases

2013-12-04 Thread William Shadish
Dear R-Helpers, I posted two days ago on testing significance of random effects in mgcv, but realize I did not make my overall purpose clear. I have a series of N short time series, where N might range from 3-10 and short means a median of 20 time points. The sample data below (PCP) has N = 4

Re: [R] Variable importance - ANN

2013-12-04 Thread Max Kuhn
If you are using the nnet package, the caret package has a variable importance method based on Gevrey, M., Dimopoulos, I., Lek, S. (2003). Review and comparison of methods to study the contribution of variables in artificial neural network models. Ecological Modelling, 160(3), 249-264. It is

[R] pROC plot.roc - Plotting more than two curves - Is it possible

2013-12-04 Thread Lopez, Dan
Hi R Experts, The info in this link suggests that plot in the pROC package can only compare two ROC curves at one time. https://stat.ethz.ch/pipermail/r-packages/2011/001220.html But this is from a couple of years ago. Curious if that has changed and if anyone knows how to plot more than one

Re: [R] pROC plot.roc - Plotting more than two curves - Is it possible

2013-12-04 Thread Murat Tasan
have you looked at the ROCR package? there are at least a few ways to plot multiple ROC curves with the ROCR functions that come to mind. e.g. if you pass lists of 'scores' and 'labels' in to the prediction(...) method, the default plot(...) method will display all of the ROC (or precision-recall,

Re: [R] importing many csv files into separate matrices

2013-12-04 Thread Greg Snow
As you have noticed, using assign is not simple, and your approach has potential to cause even more problems even if you get it working. Here is another approach: loadCSVfiles - function(path) { x - list.files(path, full.names=TRUE) out - lapply( x, read.csv ) names(out) -

Re: [R] importing many csv files into separate matrices

2013-12-04 Thread Henrik Bengtsson
On Wed, Dec 4, 2013 at 6:53 PM, Greg Snow 538...@gmail.com wrote: As you have noticed, using assign is not simple, and your approach has potential to cause even more problems even if you get it working. Here is another approach: loadCSVfiles - function(path) { x - list.files(path,

Re: [R] Error: C stack usage is too close to the limit when using list.files()

2013-12-04 Thread Henrik Bengtsson
FYI, in R.utils (= 1.28.4) you can use listDirectory() to control how deep the recursion goes, which would give you protection against your problem, e.g. R.utils::listDirectory(dir, recursive=5L) where recursive=0L is equivalent to recursive=FALSE. Using recursive=TRUE corresponds to

[R] question about how to install package rjava in R 3.02

2013-12-04 Thread tlw1987 [via R]
Hello, everybody , recently , I want to install the package rjava in windows 7 64bt. But it can not success.This error messages is as follow: install.packages(rjava) Warning in install.packages : package ‘rjava’ is not available (for R version 3.0.2) Warning in install.packages : Perhaps

Re: [R] question about how to install package rjava in R 3.02

2013-12-04 Thread Pascal Oettli
Hello, Please read carefully the message. It says you three times that the name is rJava, not rjava. Regards, Pascal On 5 December 2013 13:19, tlw1987 [via R] ml-node+s789695n4681662...@n4.nabble.com wrote: Hello, everybody , recently , I want to install the package rjava in windows 7 64bt.