[R] R help- fit distribution "fitdistr"

2016-05-25 Thread Jessica Wang
Hello, I just start using R. I want to use ??fitdistr?? to fit distribution of the data. Then how can I verify if the data really fit the distribution? Thanks [data is attached] res<-fitdistr(data$Report.delay, "Poisson") h<-hist(data$Report.delay) xfit<-floor(seq(0, 250, 50))

Re: [R] Computing means of multiple variables based on a condition

2016-05-25 Thread KMNanus
These will be overlapping subgroups from the same data frame. For example, d<=2 will have length=9, d<=4 will have length=7, etc. Ken kmna...@gmail.com 914-450-0816 (tel) 347-730-4813 (fax) > On May 25, 2016, at 9:06 PM, William Dunlap wrote: > > Just to be clear, do

Re: [R] strange error

2016-05-25 Thread John Dougherty
On Wed, 25 May 2016 18:56:47 +0200 alicekalk...@freenet.de wrote: Alice, Have you tried running the code in R in a terminal? If the error persists, then this may be the right place to ask for help. If it is specific to R Studio, then you need to ask them. -- John

[R-es] Error en subset selection

2016-05-25 Thread Elkin Tabares
Hola a todas, Quiero realizar un subset selection usando el paquete leaps, entre mis variables explicativas tengo rezagos de las mismas, por tanto tienen datos NA. sin embargo, al tratar de realizar cross validation me pide que los datos esten en formato data.frame con lo que me arroja un error

Re: [R] Computing means of multiple variables based on a condition

2016-05-25 Thread William Dunlap via R-help
Just to be clear, do you really want your 'condition' groups to be be subsets of one another? Most (all?) of the *ply functions assume you want non-overlapping groups so they do a split-summarize-combine sequence. You would have to replace the split part of that. Bill Dunlap TIBCO Software

[R] Computing means of multiple variables based on a condition

2016-05-25 Thread KMNanus
I have a large dataset, a sample of which is: a<- c(“A”, “B”,“A”, “B”,“A”, “B”,“A”, “B”,“A”, “B”) b <-c(15, 35, 20, 99, 75, 64, 33, 78, 45, 20) c<- c( 111, 234, 456, 876, 246, 662, 345, 480, 512, 179) d<- c(1.1, 3.2, 14.2, 8.7, 12.5, 5.9, 8.3, 6.0, 2.9, 9.3) df <- data.frame(a,b,c,d) I’m

Re: [R] mixed models

2016-05-25 Thread Jeff Newmiller
Please keep the mailing list in the loop by using reply-all. I don't think there is a requirement that the number of levels is equal, but there may be problems if you don't have the minimum number of records corresponding to each combination of levels specified in your model. You can change

[R] svymean in multistage desing

2016-05-25 Thread Diego Cuellar
Thanks for your attention. I have been using your R library, survey, I made an example for two stage sampling SI – SI, an estimate the total and the mean, (the point estimation y de SE) and also, I remaking the estimation. For the total, point estimation and estimation of the variance, we

Re: [R] strange error

2016-05-25 Thread Tom Wright
It may not be the problem, but with RStudio this error pops up when the area reserved for plotting is too small. Typically this area is in the right hand column, if you have this minimised (perhaps to maximise space for typing) you will hit this problem. Try making it bigger. Edit: Just ran your

Re: [R] strange error

2016-05-25 Thread Duncan Murdoch
On 25/05/2016 12:56 PM, alicekalk...@freenet.de wrote: Hello everyone, almost every time I try to plot something R gives me the following mistake: Error in plot.new() : figure margins too large One example would be, when I tried to run a function, somebody published to create a Lorenz

[R] strange error

2016-05-25 Thread alicekalkuhl
Hello everyone, almost every time I try to plot something R gives me the following mistake: Error in plot.new() : figure margins too large One example would be, when I tried to run a function, somebody published to create a Lorenz Attractor:   parameters <- c(s = 10, r = 28, b = 8/3) state <- c(X

Re: [R] mixed models

2016-05-25 Thread Jeff Newmiller
You forgot to show the commands to us that you used to read the data in with (your example is not "reproducible"). This step can make all the difference in the world as to whether your analysis commands will work or not. -- Sent from my phone. Please excuse my brevity. On May 25, 2016

[R] mixed models

2016-05-25 Thread James Henson
Greetings R community, My aim is to analyze a mixed-effects model with temporal pseudo-replication (repeated measures on the same experimental unit) using ‘nlme’. However, my code returns the error message “Error in na.fail.default’, even though the data frame does not contain missing values. My

Re: [R] What are some toy models I can use in R?

2016-05-25 Thread C W
On Wed, May 25, 2016 at 1:13 PM, S Ellison wrote: > > -Original Message- > > My data come from statistical model N(5, 2), with n=100, call this > model_1 > > Then, I add bias to that data with N(3, 1), with n=100, call this model_2 > Do you mean you have data from

Re: [R] What are some toy models I can use in R?

2016-05-25 Thread S Ellison
> -Original Message- > My data come from statistical model N(5, 2), with n=100, call this model_1 > Then, I add bias to that data with N(3, 1), with n=100, call this model_2 Do you mean you have data from N(5,2) that has had data from N(3,1) added to it, or that you have two different

Re: [R] Reduce does not work with data.table?

2016-05-25 Thread Jeff Newmiller
This is a design feature of data.table objects, which don't conform to the normal functional programming paradigm that R is usually designed to adhere to and which Reduce expects. Specifically, they normally modify in-place rather than leaving the original object alone. In short, don't do

[R-es] Error en "optim" modelo APARCH sstd

2016-05-25 Thread Mª Ángeles Navarro
Hola a todos! Estoy aplicando un modelo APARCH (1,1) con distribuci�n t-student asim�trica (sstd) a una serie de rendimientos financieros. Mi problema es que he ejecutado el modelo,con el mismo c�digo, en diferentes series (de mismo tama�o muestral) obteniendo resultados adecuados, pero en

[R] What are some toy models I can use in R?

2016-05-25 Thread C W
Hi everyone, I am searching for some toy models in R. My goal is do to model checking. For example, My data come from statistical model N(5, 2), with n=100, call this model_1 Then, I add bias to that data with N(3, 1), with n=100, call this model_2 Ultimately, I want to see model_1+ model_2

[R] Reduce does not work with data.table?

2016-05-25 Thread James Hirschorn
Reduce is failing when applied to a list of elements of class data.table. Perhaps this is a bug? Example: library(data.table) dt1 <- data.table(x = 1:3, y = 4:6) dt2 <- data.table(x = 4:6, y = 1:3) dt3 <- data.table(x = 0:-2, y = 0:-2) # This works fine dt1 + dt2 + dt2 #x y # 1: 5 5 # 2:

[R] [R-pkgs] New package: sparsevar

2016-05-25 Thread Simone Vazzoler
Dear R users, I would like to announce a new package called "sparsevar" version 0.0.3: https://cran.r-project.org/web/packages/sparsevar/ The package should be useful to estimate sparse VAR/VECM models. The developing version can be found on Github: https://github.com/svazzole/sparsevar

[R] Connecting to Hive in Kerberos enabled hadoop cluster from R

2016-05-25 Thread Kumar, Anoop (GE Corporate, consultant)
Hi All, Request your help. We are trying to connect to hive from R using Rstudio. Its a kerberos secured cluster. Code snippet is below. == library(rJava) library(RJDBC) cp =

Re: [R] Factor Variable frequency

2016-05-25 Thread S Ellison
> ruipbarra...@sapo.pt > Maybe the following (untested). > > table(df$Protocol[df$Speed == "SLOW"]) Could also use which.max to get the particular item: ... tprot <- table(df$Protocol[df$Speed == "SLOW"]) tprot[which.max(tprot)] S Ellison

[R] Antwort: Re: Creating a data frame from scratch (SOLVED)

2016-05-25 Thread G . Maubach
Hi Dan, Hi All, many thanks for your help. Please find enclosed my little function for your use: -- cut -- #--- # Module: t_count_na.R # Author: Georg Maubach # Date : 2016-05-24 # Update