similar to: reordering levels error

Displaying 13 results from an estimated 13 matches similar to: "reordering levels error"

2010 May 10
1
cumsum output
Hi: Thanks to Dennis and Fernando for your help reordering the levels. Now I have a different issue: I am trying to get the?cumulative weekly values using cumsum and it appears to output the wrong?values. Here's my dataset: winter <-? structure(list(week = c(26L, 27L, 28L, 29L, 30L, 31L, 32L, 33L, 34L, 35L, 36L, 37L, 38L, 39L, 40L, 41L, 42L, 43L, 44L, 45L, 46L, 47L, 48L, 49L, 50L, 51L,
2010 May 11
2
predicting without a model
Hello: I have 5 years of weekly passage data and want to predict fish passage for the following year. I don't have a model to use to predict data for the sixth year. Can I somehow still predict based on these five years? I just want to see on the graph what the predicted year would look like and how those?new values are generated. Gracias? ? ?fall <- structure(list(week = c(48L, 49L, 50L,
2010 Feb 19
1
ggplot2 X axis levels
Hi all: I've done this before with factors but can't figure how to do it with a continuous variable. I am trying to reorder the sequence of my weeks along the X axis. I want to start with week 27 to 52 and then 1 to 26. I guess I could use levels along with seq() but doesn't seem to work for me. Thanks for your help winter <- structure(list(week = c(27L, 28L, 29L, 30L, 31L, 32L,
2011 Jul 27
1
create a index.date column
Dear R users, I created a matrix that tells me the first day of use of a category by id. #Calculate time difference test$tdiff<-as.numeric(difftime(as.Date("2002-09-01"), test$ftime, units = "days")) # obtain the index date per person and dcategory index.date.test<-tapply(test$tdiff, list(test$id, test$rcat), max) Nonetheless, at the moment I think will be
2010 Apr 20
5
Assigning Week Numbers
R experts, How could I extract the week number from a date vector (in Date class) such that week numbering (week 1...2...) begins (May 01) and ends (October 31) on the same specific dates each year? Week numbering must conform to the following day numbering format (Sat=1,Sun=2,Mon=3.....Fri=7). This means that new weeks must begin on Saturdays, and end on Fridays (except for the first date
2017 Dec 06
2
Odd dates generated in Forecasts
Dear friends, I have a weekly time series which starts on Jan 4th, 2003 and ends on december 31st, 2016. I set up my ts object as follows: MyTseries <- ts(mydataset, start=2003, end=2016, frequency=52) MyModel <- auto.arima(MyTseries, d=1, D=1) MyModelForecast <- forecast (MyModel, h=12) Since my last observation was on december 31st, 2016 I expected my forecast date to start on
2012 Jul 10
2
estimation of NA by predict command
Dear arun and all R users, I will first of all try to simply define my issue.. I have data in the following format Year Discharge dd/mm/yyyy x .. … … … There are some NA values in the discharge which I would like to predict by using “predict command”. I cant figure out the way to write the coding for that. Could you please help me on that??? I have also ,written
2017 Dec 06
0
Odd dates generated in Forecasts
> On Dec 6, 2017, at 5:07 AM, Paul Bernal <paulbernal07 at gmail.com> wrote: > > Dear friends, > > I have a weekly time series which starts on Jan 4th, 2003 and ends on > december 31st, 2016. > > I set up my ts object as follows: > > MyTseries <- ts(mydataset, start=2003, end=2016, frequency=52) > > MyModel <- auto.arima(MyTseries, d=1, D=1)
2012 Oct 29
4
replace repeated id in a pedigree list
Hello, I have a pedigree file such this: FAMID ID FA ID MO ID SEX STATUS 1 1 0 0 2 0 1 2 3 1 2 2 1 4 3 1 1 2 1 5 3 1 1 0 1 6 3 1 1 0 1 7 3 1 2 2 1 8 3 1 1 0 1 9 3 1 1 0 1 10 3 1 2 0 1 11 3 1 1 0 1 3 0 0 1 0 2 12 13
2017 Dec 06
1
Odd dates generated in Forecasts
Thank you very much David. As a matter of fact, I solved it by doing the following: MyTimeSeriesObj <- ts(MyData, freq=365.25/7, start=decimal_date(mdy("01-04-2003"))) After doing that adjustment, my forecasts dates started from 2017 on. Cheers, Paul 2017-12-06 12:03 GMT-05:00 David Winsemius <dwinsemius at comcast.net>: > > > On Dec 6, 2017, at 5:07 AM, Paul
2009 May 21
2
Naming a random effect in lmer
Dear guRus: I am using lmer for a mixed model that includes a random intercept for a set of effects that have the same distribution, Normal(0, sig2b). This set of effects is of variable size, so I am using an as.formula statement to create the formula for lmer. For example, if the set of random effects has dimension 8, then the lmer call is: Zs<-
2008 Aug 01
0
multinomRob: Error in eigen [..] infinite or missing values in 'x'
I'm interested in analysing some of my data using multinomial regression. I have been using nnet's multinom so far. However, I found that some of the data shows overdispersion and hence want to change to robust multinomial regression, package: multinomRob I have succesfully implemented Agresti's (2002) alligator example (chapter 7, p 268) using the option MLEonly=TRUE as there are too
2012 Aug 27
2
Font size in geom_dl (using ggplot2)
Hey everyone, I am an R-newby... so sorry for bothering you with simple-to-solve questions;) I have the following issue: trying to add labels to my scatterplots (with geom_dl in ggplot2). Everything works fine, but after checking every resource I do not find a way to change the font size of my labels. I tried size, cex, fontsize at every position... but it always stays the same. ggplot()+