[R] beta binomial distribution

2017-10-06 Thread Akram Alhadainy
Hi, I need to write two inequalities depend on cumulative distribution (CDF) of beta binomial distribution where alpha and beta are unknown and need to find them. CDF of betabinomial(2,10,alpha,beta) <0.3<=CDF of betabinomial(3,10,alpha,beta) and CDF of betabinomial(5,10,alpha,beta) <0.8<=CDF of

[R] bootstrapping results in table format

2017-10-06 Thread Peter Wagey
Hi R users, I was struggling to put the results into table format. Would you mind to show using following data and code how we can put the results into table? I further would like to have a confidence interval for each group. set.seed(1000) data <- as.data.table(list(x1 = runif(200), x2 = runif(

Re: [R] Adjusted survival curves

2017-10-06 Thread David Winsemius
On Oct 6, 2017, at 7:58 PM, Ted (Beginner) via R-help wrote: > For adjusted survival curves I took the sample code from here: > https://rpubs.com/daspringate/survival > and adapted for my date, but got error. > I would like to understand what is my mistake. Thanks! > > #ADAPTATION FOR MY DAT

[R] Adjusted survival curves

2017-10-06 Thread Beginner
For adjusted survival curves I took the sample code from here: https://rpubs.com/daspringate/survival and adapted for my date, but got error. I would like to understand what is my mistake. Thanks! #ADAPTATION FOR MY DATA library(survival) library(survminer) df<-read.csv("F:/R/data/base.csv", hea

Re: [R] Formatting the dates generated by the forecast function

2017-10-06 Thread Bert Gunter
?format.Date -- Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) On Fri, Oct 6, 2017 at 11:30 AM, Paul Bernal wrote: > Dear friend, hope you are doing great,

[R] Formatting the dates generated by the forecast function

2017-10-06 Thread Paul Bernal
Dear friend, hope you are doing great, I have the following code: > myTseriesData <- ts(data[,2], start=c(2000,01), end=c(2017,9), frequency=12) > myTseriesModel <- auto.arima(myTseriesData, d=1, D=1) > myTseriesForecast <- forecast(myTseriesModel, h=12) > # I want to be able to format the dates

Re: [R] How to resolve this error

2017-10-06 Thread Bert Gunter
?duplicated to find the duplicated elements. e.g. duplicated(obs[,c("date","ID")]) ## data frame of relevant columns Note that a web search on "Find duplicates in R" would have brought this up immediately. ** Do** avail yourself of standard search capabilities before posting. Cheers, Bert

[R] How to resolve this error

2017-10-06 Thread Joshua Bedana
> library(SpatioTemporal) > library(plotrix) > library(maps) > palay.cov<-read.csv("C:/Users/BEDANA-PC/Desktop/STThesisWD/Thesis Data/palay.covar.csv") > palay.o<-read.table("C:/Users/BEDANA-PC/Desktop/STThesisWD/Thesis Data/palay.obs.txt") > palay.obs<-as.matrix(palay.o) > palay.stc<-read.table("C

Re: [R] Help in R package

2017-10-06 Thread David Winsemius
> On Oct 5, 2017, at 7:19 PM, Akram Alhadainy wrote: > > Hello, > > I watched your YouTube videos for explanation for R package. Rhelp is a mailing list. It does not release Youtube videos. > They are > really helpful for new beginner for using R. Please I need your help for > solving inequal

Re: [R] Time series: xts/zoo object at annual (yearly) frequency

2017-10-06 Thread Gabor Grothendieck
Maybe one of these are close enough: xts(c(2, 4, 5), yearqtr(1991:1993)) as.xts(ts(c(2, 4, 5), 1991)) of if you want only a plain year as the index then then use zoo, zooreg or ts class: library(zoo) zoo(c(2, 4, 5), 1991:1993) zooreg(c(2, 4, 5), 1991) ts(c(2, 4, 5), 1991) On Fri,

Re: [R] Help RFM analysis in R (i want a code where i can define my own breaks instead of system defined breaks used in auto_RFM package)

2017-10-06 Thread Jim Lemon
Hi Hemant, I had a chance to look at this. Here is a function that allows you to rank customers on the raw values of recency, frequency and monetary. I added the code for cutting the raw values into intervals, but haven't had a chance to test it and I can't test it right now. It may be helpful. rf

[R] Help RFM analysis in R (i want a code where i can define my own breaks instead of system defined breaks used in auto_RFM package)

2017-10-06 Thread Hemant Sain
I'm trying to perform an RFM analysis on the attached dataset, I'm able to get the results using the auto_rfm function but i want to define my own breaks for RFM. as follow r <-c(30,60,90) f <-c(2,5,8) m <-c(10,20,30) but when i tried to define my own breaks i got the identical result for RFM i.e

Re: [R] Time series: xts/zoo object at annual (yearly) frequency

2017-10-06 Thread Eric Berger
Hi John, Here's one way to do it: vec <- c(2,4,5) yrs <- seq(from=as.Date("1991-01-01"),by="1 year",length=length(vec)) a <- xts(x=vec, order.by=yrs) HTH, Eric On Fri, Oct 6, 2017 at 9:56 AM, John wrote: > Hi, > >I'd like to make a time series at an annual frequency. > > > a<-xts(x=c(2,4,