Displaying 20 results from an estimated 100 matches similar to: "convert weekly time series data to monthly"
2007 Nov 28
2
extracting year an month from ts data set
I have an ascii data set of monthly observation starting in Jan 1946 with a
header.
hstarts
57
65
95
103
103
97
94
.
.
.
Which I read with the following code
tab6.1<-ts(read.table(fname, header=TRUE),frequency=12,start=c(1946,1))
I would like to run a time series model with dummy variables for each month.
If I had a variable which take values from 1 to 12 indicating the month I
could use
2008 Apr 30
2
Bug? in summary( ) function base package
There seems to be an error in the summary() function when applied to "ts"
class objects. The results of a call to summary( ), on the R "ts" data set
USAccDeaths , reports the wrong value for Max. The value reported by the
summary function is 11320. The max( ) function returns the correct value
11317, the July 1993 value. Coercing the data to a data.frame and calling
summary
2007 Dec 05
1
Working with "ts" objects
I am relatively new to R and object oriented programming. I have relied on
SAS for most of my data analysis. I teach an introductory undergraduate
forecasting course using the Diebold text and I am considering using R in
addition to SAS and Eviews in the course. I work primarily with univariate
or multivariate time series data. I am having a great deal of difficulty
understanding and working with
2010 Feb 07
2
Reading hierarchical data
I would like to read the following hierarchical data set. There is a family
record followed by one or more personal records.
If col. 7 is "1" it is a family record. If it is "2" it is a personal
record.
The family record is formatted as follows:
col. 1-5 family id
col. 7 "1"
col. 9 dwelling type code
The personal record is formatted as follows:
col.
2008 Jan 03
1
R procedure similar to STATA heckprob?
Is anyone aware of an R procedure similar to STATA's "heckprob" procedure?
"Heckprob" fits maximum likelihood probit models correcting for sample
selection bias.
Thanks,
Richard Saba
Department of Economics
Auburn University
Email: sabaric@auburn.edu
[[alternative HTML version deleted]]
2008 Mar 21
1
tseries(arma) vs. stats(arima)
Hello,
The "arma" function in the "tseries" package allows estimation of models
with specific "ar" and "ma" lags with its "lag" argument.
For example: y[t] = a[0] + a[1]y[t-3] +b[1]e[t-2] + e[t] can be estimated
with the following specification : arma(y, lag=list(ar=3,ma=2)).
Is this possible with the "arima" function in the
2008 Feb 12
2
Formulae for R functions
Can someone direct me to a resource or resources that list the formulae used
by R functions (i.e. predict.lm ) to calculate the statistic reported. I
am not a programmer and studying the r code is extremely slow going. I
have searched r-project.org and all the function help files without
success. For example I have attempted to replicate by hand the se.fit
calculation from a lm object
2012 Oct 15
1
performance analytics
hi Michael,
am sorry for the incomplete reply .
csv file data havinmg like this ,
>getSymbols("IBM")
>weekly_data = to.weekly(week_name)
>dataframe=data.frame(weekly_data)
>outputfile_name="F:\\R-programs\\Outputfile.csv"
>write.table(dataframe, file =outputfile_name,sep = ",",col.names
=TRUE,row.names = T)
> datafrom_table <-
2008 Jan 11
1
question about xreg of arima
Hi,
I am trying to understand exactly what xreg does in arima. The documentation
for xreg says:"xreg Optionally, a vector or matrix of external regressors,
which must have the same number of rows as x." What does this mean with
regard to the action of xreg in arima?
Apparently somehow xreg made the following two arima fit equivalent in R:
arima(x, order=c(1,1,1), xreg=1:length(x))
is
2010 Apr 08
1
reshape panel data
I have a data set with observations on 549 cities spanning an 18 year
period. However, some of cities did not report in one or more of the 18
years. I would like to implement the procedure suggested by Wooldridge
section 17.1.3 in his "Econometric analysis of cross section and panel data"
to correct for attrition. For example the table below indicates that the 3rd
and the 7th cities in
2010 Dec 07
3
understanding output of tapply/by cumsum
Dear R-users,
I have a dataset with categories and numbers.
I would like to compute and add cumulative numbers
to the dataset.
I do not understand the structure of by(...) or
tapply(...) output enough to handle it.
Here a small example
--------------
d<-expand.grid(a=1:5,b=1:3,c=1:2)
d$n = 10 * d$a + d$b +0.1* d$c
Sn<-by(d$n,list(d$a,d$c),cumsum)
str(Sn)
---------
List of 10
$ : num
2007 Feb 06
1
ANOVA Table for Full Linear Model?
Hello,
I have spent a good deal of time searching for an answer to this but
have come up empty-handed; I apologize if I missed something that is
common knowledge.
I am trying to figure out how to get an ANOVA table that shows the
sum of squares. degrees of freedom, etc, for the full model versus
the error (aka residuals).
Here is an example of the kind of table I'd like to get:
2008 Aug 07
2
colouring a tree
Hi all.
I would be very pleased if someone could help me, as I do not seem to get the different branches of my tree painted in different colours. The closest I get is colouring the names of my samples(=names of the branches). Here is the code.
data <- read.table(file = "S://SEDIM//TRFLP//B12.5_50-700bp.txt" , as.is = TRUE, header = TRUE, sep = "\t", row.names =
2010 Jun 08
2
problem with if else statement
Dear colleagues,
What did I not understand ?
->my intention
I want to create a new variable:
In plain language:
If someone is taking anithypertensive treatment (med.hyper==1)
table(med.hyper)
med.hyper
0 1
472 97
I want to subtract 5 mmHg (rr.dia.2m-5) from the measured diastolic
blood pressure (rr.dia.2m)
if not treated - the value of the measured diastolic blood pressure
should
2005 Apr 12
2
Perhaps Off-topic lme question
A question on lme() :
details: nlme() in R 2.1.0 beta or 2.0.1
The data,y, consisted of 82 data value in 5 groups of sizes 3 9 8 28 34
.
I fit a simple one level random effects model by:
myfit <- lme( y~1, rand = ~1|Group)
The REML estimates of between and within Group effects are .0032 and .53,
respectively; the between group component is essentially zero as is clearly
evident from a
2008 Apr 03
3
summary(object, test=c("Roy", "Wilks", "Pillai", ....) AND ellipse(object, center=....)
Dear All,
I would be very appreciative of your help with the following
1). I am running multivariate multiple regression through the manova() function (kindly suggested by Professor Venables) and getting two different answers for test=c("Wilks","Roy","Pillai") and tests=c("Wilks","Roy",'"Pillai") as shown below. In the
2015 Dec 29
2
[HCL] NHS Laser Senoidal 5000VA supported by gamatronic
Device Manufacturer: NHS
Device Name: Laser Senoidal 5000VA
upsc output when the UPS is in normal condition:
battery.charge: 100
battery.current: 0.4
battery.date: 12292015
battery.runtime: 00000
battery.runtime.low: 59940
battery.temperature: 00
battery.voltage: 163.4
device.mfr: NHS Sistemas de Energia
device.model: Laser Senoidal 5000VA
device.type: ups
driver.name: gamatronic
2011 Aug 03
3
R.app installer probs on Snow Leopard
Have tried to install R.app several times (6, in fact: versions 2.12, 13 & 14, both 32 and 64 bit versions), using packages freshly downloaded from the official project page, and failed every time, given exception reports such as the following (appended below, the 2 reports arising out of my 1st & 6th attempts).
Machine & software version specifics are all contained therein.
What
2011 Mar 25
1
Samba Tuning to increase Throughput
Hi All,
I have gone through threads related to throughput issue in this list. Found few
similar issue, but could not get the solution.
So looking for some advice from group.
I am trying to use the samba to access a USB disk connected to our evaluation
board which has xtensa core running at 400 MHz.
Samba 3.5.x is running on the board. We are getting below throughput as tested
with the
2011 Sep 07
1
reshaping data
I have the following data (see RawData using dput below)
How do I get it in the following 3 column format (CO2 measurements are the
elements of the original data frame). I'm sure the package reshape is where
I should look, but I haven't figured out how.
Thanks ahead of time
Month Year CO2
J 1958
F 1958
M 1958 315.71
A 1958 317.45
M.1 1958 317.5
J.1 1958
J.2 1958 315.86
A.1 1958