[R] pls package

2016-03-15 Thread cindy Guo
Hi All, I am using the cppls function in the pls package, and I want to use cross validation to determine the best number of components. Since Hastie et al recommended a "one standard error rule", i.e., choose the most parsimonious model whose error is no more than one standard error above the

Re: [R] Logistic Regression output baseline (reference) category

2016-03-15 Thread David Winsemius
> On Mar 15, 2016, at 1:27 PM, Michael Artz wrote: > > Hi, > I am trying to use the summary from the glm function as a data source. I > am using the call sink() then > summary(logisticRegModel)$coefficients then sink(). Since it's a matrix you may need to locate a

Re: [R-es] no puedo instalar knitr y Rmarkdown en ubuntu

2016-03-15 Thread Carlos J. Gil Bellosta
Hummm... stringr depende de stringi, que es el que da el error. Prueba install.packages("stringr", dependencies = TRUE) En principio, R debería instalar todas las dependencias. Pero parece que no es el caso aquí. Un saludo, Carlos J. Gil Bellosta http://www.datanalytics.com El 16 de marzo de

Re: [R-es] no puedo instalar knitr y Rmarkdown en ubuntu

2016-03-15 Thread Jose Ramirez Costa
Hola Carlos, el ubuntu tiene compilador :) Este es el error completo al querer instalar el paquete stringr Installing package into ‘/home/jose210179/R/i686-pc-linux-gnu-library/3.2’ (as ‘lib’ is unspecified) --2016-03-15 21:46:23-- https://cran.rstudio.com/src/contrib/stringr_1.0.0.tar.gz

Re: [R-es] no puedo instalar knitr y Rmarkdown en ubuntu

2016-03-15 Thread Carlos J. Gil Bellosta
Hola, ¿qué tal? Trata de instalar el paquete stringr primero (que es el que da error). ¿Te deja? Si hay error, ¿puedes copiar el mensaje completo? Una pregunta tonta: en tu Ubuntu, ¿hay compilador? Un saludo, Carlos J. Gil Bellosta http://www.datanalytics.com El 16 de marzo de 2016, 0:41,

[R-es] no puedo instalar knitr y Rmarkdown en ubuntu

2016-03-15 Thread Jose Ramirez Costa
Buenas, he intentado varias veces instalar knitr y Rmarkdown tanto desde Rstudio como desde la terminal de Ubuntu usando diferentes codigos y en nunca consegui q lo instalara. el error q tira es el siguiente: Warning in install.packages : installation of package

Re: [R] Truncated file upon reading a text file with 0xff characters

2016-03-15 Thread Jean-Claude Arbaut
Thank you for the answer. I was about to ask why I should avoid text connections, but actually I just noticed that with a binary connection for the read, the problem disappears (I mean, I replace "rt" with "rb" in the file open). R is even clever enough that, when feeded the latin1 file after an

Re: [R] Logistic Regression output baseline (reference) category

2016-03-15 Thread Bert Gunter
The reference category is aliased with the constant term in the default contr.treatment contrasts. See ?contr.treatment , ?C, ?contrasts If you don't know what this means, you should probably consult a local statistical resource or ask about linear model contrasts at a statistical help website

[R] Logistic Regression output baseline (reference) category

2016-03-15 Thread Michael Artz
Hi, I am trying to use the summary from the glm function as a data source. I am using the call sink() then summary(logisticRegModel)$coefficients then sink(). The independent variables are categorical and thus there is always a baseline value for every category that is omitted from the glm

Re: [R] Truncated file upon reading a text file with 0xff characters

2016-03-15 Thread Duncan Murdoch
I think you've identified a bug (or more than one) here, but your message is so long, I haven't had time to go through it all. I'd suggest that you write up a shorter version for the bug list. The shorter version would 1. Write the latin1 file using writeBin. 2. Set options(encoding = "")

Re: [R] About calculation of the gravity model in R and STATA software

2016-03-15 Thread Jeff Newmiller
I am not the person to answer your question, but have some suggestions: Make your examples reproducible so others can confirm your results and explore other issues you may not have seen. [1] [2] Post your question on the R-sig-mixed mailing list, where mixed models experts hang out, instead

[R] Truncated file upon reading a text file with 0xff characters

2016-03-15 Thread Jean-Claude Arbaut
Hello R users, I am having problems to read a CSV file that contains names with character ÿ. In case it doesn't print correctly, it's Unicode character 00FF or LATIN SMALL LETTER Y WITH DIAERESIS. My computer has Windows 7 and R 3.2.4. Initially, I configured my computer to run

[R] About calculation of the gravity model in R and STATA software

2016-03-15 Thread Сергей С .
Dear colleagues! We spent calculation of the gravity model in R and STATA software. For calculations we used the standard package glmm in R (with parameter family = quasipoisson) and ppml in STATA. Call the calculation procedure in R: summary(glmm<-glm(formula=exports ~ ln_GDPimporter +

Re: [R] doubt clarification

2016-03-15 Thread Duncan Murdoch
On 15/03/2016 12:53 PM, MEHER DIVYA BARATAM wrote: dear sir/madam, i am a new learner of r software. while plotting a graph of data which contains date. i have dates on X-axis, while learning i got to know i have to convert into R understandable language. i got an error

[R] doubt clarification

2016-03-15 Thread MEHER DIVYA BARATAM
dear sir/madam, i am a new learner of r software. while plotting a graph of data which contains date. i have dates on X-axis, while learning i got to know i have to convert into R understandable language. i got an error while converting "as.Date(all.2015$Day,%d-%m-%y)

Re: [R] Linear Model and Missing Data in Predictors

2016-03-15 Thread William Dunlap via R-help
One technique for dealing with this is called 'multiple imputation'. Google for 'multiple imputation in R' to find R packages that implement it (e.g., the 'mi' package). Bill Dunlap TIBCO Software wdunlap tibco.com On Tue, Mar 15, 2016 at 8:14 AM, Lorenzo Isella wrote:

Re: [R] Linear Model and Missing Data in Predictors

2016-03-15 Thread Jeff Newmiller
IMHO this is not a question about R... it is a question about statistics whether R is involved or not. As such, a forum like stats.stackexchange.com would be better suited to address this. FWIW I happen to think that expecting R to solve this for you is unreasonable. -- Sent from my phone.

[R] Linear Model and Missing Data in Predictors

2016-03-15 Thread Lorenzo Isella
Dear All, A situation that for sure happens very often: suppose you are in the following situation set.seed(1235) x1 <- seq(30) x2 <- c(rep(NA, 9), rnorm(19)+9, c(NA, NA)) x3 <- c(rnorm(17)-2, rep(NA, 13)) y <- exp(seq(1,5, length=30)) mm<-lm(y~x1+x2+x3) i.e. you try a simple linear

[R] ivprobit what are formula1 and formula2

2016-03-15 Thread Betty Betty
Dear All, Can some one explain to me what exactly is formula1 and formula2 in the ivprobit(formula1, formula2, data = list(), ...). The manual for ivprobit has quite limited information and i found it difficult to understand. Thank you very much! [[alternative HTML version deleted]]

Re: [R] R problem : Error: protect(): protection stack overflow

2016-03-15 Thread Mohammad Tanvir Ahamed via R-help
Thanks . I have informed package maintainer. Tanvir Ahamed Göteborg, Sweden | mashra...@yahoo.com - Original Message - From: Martin Morgan To: Mohammad Tanvir Ahamed ; R-help Mailing List Sent: Tuesday,

Re: [R] List funtion

2016-03-15 Thread Mohammad Tanvir Ahamed via R-help
> v3<-list(rep(list(v1),2),rep(list(v2),3)) > v3 [[1]] [[1]][[1]] [1] 8 4 9 12 [[1]][[2]] [1] 8 4 9 12 [[2]] [[2]][[1]] [1] 7 8 11 [[2]][[2]] [1] 7 8 11 [[2]][[3]] [1] 7 8 11 if you want to track each list category. Tanvir Ahamed Göteborg, Sweden |

Re: [R] List funtion

2016-03-15 Thread ruipbarradas
Hello, rep() is vectorized so you can do rep (my_list, 2:3) Hope this helps, Rui Barradas   Citando André Luis Neves : > Dear, > > I have the following data: > > v1 <- c(8,4,9,12) > v2 <- c(7, 8, 11) > my_list <- list(v1,v2) > rep (my_list,3) > > My question is how I

Re: [R] R problem : Error: protect(): protection stack overflow

2016-03-15 Thread Martin Morgan
On 03/14/2016 06:39 PM, Mohammad Tanvir Ahamed via R-help wrote: Hi, i got an error while i am running a big data. Error has explained by the following sample sample This is an error in the package, and should be reported to the maintainer. Discover the maintainer with the command

Re: [R-es] Lógica Bayesiana con R

2016-03-15 Thread Francisco Rodriguez Sanchez
Hola Milagros, También está el paquete rstanarm que está muy bien: https://cran.r-project.org/web/packages/rstanarm/index.html. Tienes varias viñetas o tutoriales muy buenos, incluyendo regresión logística: https://cran.r-project.org/web/packages/rstanarm/vignettes/binomial.html Suerte

[R] List funtion

2016-03-15 Thread André Luis Neves
Dear, I have the following data: v1 <- c(8,4,9,12) v2 <- c(7, 8, 11) my_list <- list(v1,v2) rep (my_list,3) My question is how I can modify my command line to create a list called my_list containing two copies of the first vector (v1) and three copies of the vector 2 (v2). The above command

[R] Faster Block diagnonal matrix formulation in R

2016-03-15 Thread raed kuntar
What is the fastest way to create a block diagonal matrix other than bdiag function in the matrix package which is slow for large datasets I have provided a reproducible example below library(Matrix) cy11=function(a,b,H){ d=outer(a,b,`-`);I=outer(a,b,`==`) H[1]^2*d^2/H[2]^2+I*H[3]^2 }

Re: [R-es] Lógica Bayesiana con R

2016-03-15 Thread Fernando Arce
blockquote, div.yahoo_quoted { margin-left: 0 !important; border-left:1px #715FFA solid !important; padding-left:1ex !important; background-color:white !important; } Para mi la manera mas sencilla y elegante (entrecomillado) es via jags o bugs, usando su pseudocodigo para escribir el modelo

Re: [R] Please help -- Cbind data frames within LIST() in R

2016-03-15 Thread PIKAL Petr
Hi Keep your reply on rhelp list (I cc'd it). Your code is not reproducible: **only you has such directory path_data <- 'C:/Users/pc/Documents/Projects/fb' **where is function searchPages Searching 10 Pages for LinkedIn Error: could not find function "searchPages" So this is my last effort.

[R-es] Lógica Bayesiana con R

2016-03-15 Thread Milagros Camacho
Hola, buenas a todos: Me dispongo a empezar un proyecto con logística bayesiana y sé que hay varios paquetes que puedo utilizar, arm, Bayelogit y MCMCpack. Me preguntaba si alguien tiene experiencia con éstos paquetes y me pueda decir cuál de ellos es mejor. Además de esto quería saber si

Re: [R] How to speed up R program

2016-03-15 Thread MAURICE Jean - externe
Hi Ragia, If time is really a big problem and you have a lot of datas and you want to use all the cores of the processor, you should use FORTRAN for your calculations. But this is only possible with a real FORTRAN developer and will take some times. I am an old freelance (61) and I began