similar to: Time series questions

Displaying 20 results from an estimated 500 matches similar to: "Time series questions"

2001 May 06
1
legend/text in time series plot
hi, i need help on placing legend/text in a time series plot. here is what i am doing (i am using rw1022 on windoze 2000): #read data file gdpn <- scan("jngdpsa.dat", list(year=0, qtr=0, gdp=0)); gdpr <- scan("jrgdpsa.dat", list(year=0, qtr=0, gdp=0)); #convert to time series object gdpn <- ts(gdpn$gdp, frequency=4, start=c(1955,2)); gdpr <- ts(gdpr$gdp,
2011 Jun 03
4
Problem using read.xls - Everything converted to factors
Hallo, I would like to use to read.xls function from the gdata package to read data from Microsoft Excel files but I experienced a problem: For example I used the following code: testfile<-read.xls("/home/.../wsjecon0603.xls", #file path header=F, dec=",", na.strings="n.a.", skip=5, sheet=2,
2008 Nov 22
1
declaring constants in an Sweave / LaTeX document
List, I would like to set a variable to hold, say, the size of my plots in a Sweave document. i.e. something like the following in my '.Rnw' file: ============================================================================== smallPlotSize = 4 <<fig1, echo=false, results=hide, height=smallPlotSize, width=smallPlotSize, fig=true>>= dat <- read.table("
2004 Apr 14
3
A bug report?
Folks, I have a strange situation, which I may have isolated as a bug report. Or, it could just be that there's something about R that I don't know. :-) I have attached the data file and the program file but don't know whether these attachments will make it into the list. Here is my bugreport.R program -- ---------------------------------------------------------------------------
2001 Sep 24
3
x axis point labels
I am attempting to manually specify x axis value labels (NOT x axis label as in xlab) on a density plot. Generally speaking, I would like to erase the default x axis point labels and replace them with arbitrary x axis point labels relating to specific CDF points. I am sure this can be done, but it isn't obvious to me how. Has anyone done this before? My R code follows if it helps (new
2011 Dec 07
1
removing specified length of text after a period in dataframe of char's
Dear all, I'm trying to remove some text after the period (a decimal point) in the data frame 'hi', below. This is one step in formatting a table. So I would like e.g. "2.0" to become "2" and "5.3" to be "5.3", where the variable digordered contains the number of digits after the decimal that I would like to display, in the same order in which
2012 Oct 22
0
"Vars" package: impulse response function
Hello, I'm using VAR models in R in order to obtain impulse responses of stock market shock on US economy. I have series of quarterly changes in real gdp, S&P 500 and quarterly level of unemployment for 1985 - 2012 period. My series are stationary. So I did all the steps below. However I don't understand what do irf function results mean. These are the cumulative orthogonal responses
2010 Mar 18
1
Regression of a time series on its Quarters
# Dear List, # I want to characterize a time series according to its Quarter components. # My data ("a.ts": http://docs.google.com/View?id=dfvvwzr2_478cr9k4cdb)? look like: #???????????????? Qtr1????????? Qtr2????????? Qtr3????????? Qtr4 #?? 1948 -0.0714961837? 0.0101747827? 0.0654816569 -0.0227830729 #?? 1949 -0.1175517556? 0.1151378692? 0.1015777858 -0.1971535900 #?? 1950?
2007 Apr 25
0
sorting data help
I am trying to create a 2x2xk contingency table. The variables are GDP and an income inequality statistic with year being the k levels. I want to eventually run a loglinear model with the data. Currently the data is organized by either year or country. example Country Year log(GDP) sqrt(INEQ) 1 1980 24 5.3 1 1981 25 5.45 1
2008 Jan 30
2
numeric coercion when one or more elements is non numerice
I don't understand this behavior. Why does the every data point get trashed by data.matrix when there is one non-numeric element in the array? Thanks. > temp GDP CPIYOY 19540 2098.1 garbage 19632 2085.4 0.9 19724 2052.5 0.8 19814 2042.4 1.1 > data.matrix(temp) GDP CPIYOY 19540 4 4 19632 3 2 19724 2 1 19814 1
2011 Nov 16
1
geom_bar with missing data in package ggplot
Dear all, I was hoping someone could help with a ggplot question. I would like to generate a faceted bar chart, but missing data are causing problems. g<-structure(list(Date = structure(c(11322, 11687, 12052, 11322, 11687, 12052, 11322, 11687, 12052, 11322, 11687, 12052), class = "Date"), variable = c("Govt Revenues to GDP", "Govt Revenues to GDP",
2012 Jun 24
2
Defining multiple variables in a loop
Good day, For lack of a better solution (or perhaps I am ignorant to something more elegant), I have been bootstrapping panel data by hand so to speak and I would like to know if there is a way to define multiple variables in a loop using the loop variable. I found a post (here: https://stat.ethz.ch/pipermail/r-help/2002-October/026305.html ) that discussed naming multiple variables but it
2002 Jun 14
1
data.frame - transform
Hi there, I have a data.frame (pwt6) which I would like to transform: country year gdp MEX 1950 2 MEX 1951 5 BOL 1950 4 BOL 1951 12 ITA 1950 45 ITA 1951 2 This should be the result: year MEX.gdp BOL.gdp ITA.gdp 1950 2 4 45 1951 5 12 2 Right now I have this code (better - no code): country.label<-names(table(pwt6$country)) result<-data.frame(year=NULL) for(i in country.label) ?
2012 Apr 30
5
Different varable lengths
Hi! I'm trying to do a lm() test on three objects. My problem is that R protests and says that the variable lengths differ for one of the objects (Sweden.GDP.gap). But I have double checked that the number of observations are the same. All three objects should contain 9 observations but R only accepts 9 observations in two of the objects. The third must have 10! Very confusing because there
2003 Oct 04
2
(no subject)
Dear all, I have the following question. I have to fit the hierarchical model for the hypothesis concern the individual-level effects by controlling for the individual -level attributes and national-level contextual effects on individuals by using R. O have to obtain the estimates of the impact of the second-level (national: GDP per capita) effects on individuals ( in this instance the impact
2017 May 20
2
[PATCH] drm: remove NULL pointer check for clk_disable_unprepare
After long term efforts of fixing non-common clock implementations, clk_disable() is a no-op for a NULL pointer input, and this is now tree-wide consistent. All clock consumers can safely call clk_disable(_unprepare) without NULL pointer check. Signed-off-by: Masahiro Yamada <yamada.masahiro at socionext.com> --- drivers/gpu/drm/etnaviv/etnaviv_gpu.c | 15 +++++----------
2011 Aug 04
1
Running a column loop through the Moran.I function.
Dear R users, I have two data frames that consist of statistical information for most countries around the world. One dataframe consists of the latitude and longitude ("coord.csv") of each country, while the other consists of 100's of different attributes ("countryattri.csv") for each country (like, GDP, Population, etc.). The data is organized with a header and then
2011 Jun 26
2
Accessing variables in a data frame
Hello My data.frame (dat) contains many variables named var.names and others named var.names_var.id For example var.name <- c("gdp","inf","unp") var.id <- c("w","i") x <- paste(var.name, rep(var.id, each=length(var.name)), sep="_") How can I access variables in the dama.frame by names listed in x, for example to compute
2013 May 04
2
Lasso Regression error
Hi all, I have a data set containing variables LOSS, GDP, HPI and UE. (I have attached it in case it is required). Having renamed the variables as l,g,h and u, I wish to run a Lasso Regression with l as the dependent variable and all the other 3 as the independent variables. data=read.table("data.txt", header=T) l=data$LOSS h=data$HPI u=data$UE g=data$GDP matrix=data.frame(l,g,h,u)
2013 May 03
1
Likelihood
Hi all, I have run a regression and want to calculate the likelihood of obtaining the sample. Is there a way in which I can use R to get this likelihood value? Appreciate your help on this. The following are the details: raw_ols1=lm(data$LOSS~data$GDP+data$HPI+data$UE) summary(raw_ols1) Call: lm(formula = data$LOSS ~ data$GDP + data$HPI + data$UE) Residuals: Min 1Q