similar to: Mean and Timeseries modelling

Displaying 20 results from an estimated 1000 matches similar to: "Mean and Timeseries modelling"

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) ?
2009 Jan 23
2
Dates in Common
I have two collections of dates and I want to figure out what dates they have in common. This is not giving me what I want (I don't know what it is giving me). What is the best way to do this? Tom > data1 [1] "1948-02-24 EST" "1949-04-12 EST" "1950-05-29 EDT" "1951-05-21 EDT" [5] "1951-12-20 EST" "1953-01-22 EST"
2012 Dec 17
1
subset handling
Dear Rui and UseRs,[a text file has also been attached, in case the format of my email is difficult to get]I am extremely sorry that I am bothering you once again, but I?ll have to get to the bottom of it. The following command sp <- lapply(split(agg, agg$st), function(x) x[order(x$year, x$month), ]) gave me an output with monthly mean of population(as under). i am not able to apply
2011 Feb 16
1
Timeseries Data Plotted as Monthly Boxplots
Hello, I'm trying to develop a box plot of time series data to look at the range in the data values over the entire period of record. My data initially starts out as a list of hourly data, and then I've been using this code to make this data into the final ts array. # Read in the station list stn.list <- read.csv("/home/kbennett/fews/stnlist3", as.is=T, header=F) # Read in
2008 Nov 04
1
perform Kruskal-Wallis test without using the built-in command in R
Hi, again i am stuck in my presentation, and i have never learn R before in my life but need this to be done, so please help me out for a favour: http://www.nabble.com/file/p20333155/kew.dat kew.dat run this in R and these comes up: Month Year Rain 1 Jan 1900 74.400000 2 Feb 1900 80.500000 3 Mar 1900 23.600000 4 Apr 1900 23.600000 5 May 1900 25.100000 6
2013 Apr 08
2
How can I extract part of the data in a panel dataset?
Taking the Grunfeld data, which is built-in in R, for example, (1)How can I construct a dataset (or dataframe) that consists of the data of all firms in 1951? (2)How can I calculate the average capital in each form over the period 1951-1954? What I can imagine is to categorize the data by firm, and then select the data between 1951 and 1954 for each firm, but how can I do it? Thanks, Miao
2010 Apr 04
1
Adjusting X-axis time scale
Dear all, I am plotting daily data from 1950 to 2000 and I wish to have the time in X-axis to indicate years and NOT days (i.e 1950 1951,......,2000 instead of 1,2, 3, ......). How do I set the x-axis to show years instead of days. ZABLONE OWITI GRADUATE STUDENT Nanjing University of Information, Science and Technology College of International Education Add: 219 Ning Liu Rd, Nanjing,
2007 Jan 10
1
map data.frame() data after having linked them to a read.shape() object
Dear all, I try to first link data in a data.frame() to a (polygon) read.shape() object and then to plot a polygon map showing the data in the data.frame. The first linking is called "link" in ArcView and "relate" in ArcMap. I use the code shown below, though without success. Help with this would be greatly appreciated. Thanks! Tord require(maptools) # Read shape file
2007 Dec 06
3
using "eval(parse(text)) " , gsub(pattern, replacement, x) , to process "code" within a loop/custom function
R-help users, Thanks in advance for any assistance ... I truly appreciate your expertise. I searched help and could not figure this out, and think you can probably offer some helpful tips. I apologize if I missed something, which I'm sure I probably did. I have data for many "samples". (e.g. 1950, 1951, 1952, etc.) For each "sample", I have many data-frames.
2009 Jan 10
1
Plot link points
Hi. This may be a straight-forward question... I have a time series from 1950 to 2000 (by year) with missing values. Sometimes only a year has value and the adjacent years have missing data, e.g. 1950 2.7 1951 1952 1953 3.4 1954 1955 1956 2.9 1957 3.6 1958 2.7 When I use plot (type='l'), the line can't connect the 'stand-alone' years. Is there a way I have have R to skip
2005 Jun 14
2
Plotting rows (or columns) from a matrix in different graphs, not using "par"
Dear R-users, I would like to ask whether it's possible (for sure it would be), to plot each rows (or columns) in different graphs and in the same figure region without using the function "par" and then struggling around with "axes" and labels etc. Luckily, I would always have "rows + columns = even number" and the same "ylim". The next one could be a
2007 Dec 16
1
format numbers in a contingency table
Hi, I am constructing a contingency table using xtabs. The function works great: mo yr Sep Oct Nov Dec 1950 -7.164486e-02 3.152674e-02 -1.283389e-02 1.570382e-01 1951 3.054293e-02 4.665234e-02 -2.445499e-04 8.720204e-02 1952 3.937034e-02 -4.790636e-02 5.022616e-02 1.180279e-01 but I wonder if there is an argument I can pass to xtabs
2013 Mar 13
2
merge datas
Hello all! I have a problem with R. I try to merge data like this: structure(c(2.1785, 1.868, 2.1855, 2.5175, 2.025, 2.435, 1.809, 1.628, 1.327, 1.3485, 1.4335, 2.052, 2.2465, 2.151, 1.7945, 1.79, 1.6055, 1.616, 1.633, 1.665, 2.002, 2.152, 1.736, 1.7985, 1.9155, 1.7135, 1.548, 1.568, 1.713, 2.079, 1.875, 2.12, 2.072, 1.906, 1.4645, 1.3025, 1.407, 1.5445, 1.437, 1.463, 1.5235, 1.609, 1.738, 1.478,
2001 Dec 23
1
Time Series Data
Happy Holidays All, I'm trying to use stl() to extract a seasonal component from a time series. I believe the root cause of my problem lies in how I imported the data into R. In Excel (csv), the data look like: Jan Feb Mar .... 1949 12.2 9.0 7.9 .... 1950 17.2 16.9 9.9 .... 1951 8.2 7.0 7.7 .... I import to R using:
2013 Mar 12
5
extract values
Hello all! I have a problem to extract values greater that for example 1820. I try this code: x[x[,1]>1820,]->x1 Please help me! Thank you! The data structure is: structure(c(2.576, 1.728, 3.434, 2.187, 1.928, 1.886, 1.2425, 1.23, 1.075, 1.1785, 1.186, 1.165, 1.732, 1.517, 1.4095, 1.074, 1.618, 1.677, 1.845, 1.594, 1.6655, 1.1605, 1.425, 1.099, 1.007, 1.1795, 1.3855, 1.4065, 1.138, 1.514,
2013 Apr 07
2
group data in classes
Hello all! I have a problem to group my data (years) in 10 years classes. For example for year year decade 1598 1590-1600 1599 1590-1600 1600 1590-1600 1601 1600-1610 --- my is like this> [1] 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 [16] 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 [31] 1628 1629 1630 1631 1632 1633
2008 Dec 03
1
how to handle irregularly spaced data as timeseries
I have a set of modeled climate data recorded at irregular intervals. The format of the data is such that there are monthly measurements for the years 2000, 2020, 2050, 2080, etc. Therefore I have 12 regular records, a skip of some number of years, then 12 more monthly records, another skip, and so on.... I created a dataframe from .txt with the read.table() command. For starters I need
2010 Sep 22
2
Unique subsetting question
Hi all, I'm looking at a large data set, and I'm interested in removing rows where only one variable is duplicated. Here's an example: > presidents Qtr1 Qtr2 Qtr3 Qtr4 1945 NA 87 82 75 1946 63 50 43 32 1947 35 60 54 55 1948 36 39 NA NA 1949 69 57 57 51 1950 45 37 46 39 1951 36 24 32 23 1952 25 32 NA 32 1953 59
2013 Mar 29
1
problem with data
Hello all! I have a problem with my data in R. When I want to plot the following data, I have a problem with y scale. The maximum value is cc. 10 degrees and in R is about 100. I use this code: fasy<-read.table("gridd1.txt",sep="\t",dec=",",header=T,row.names=1) # here are the years: x <- as.numeric(rownames(fasy)) # extract a series that you want to plot: y
2003 Sep 05
2
3.6p1 bug on SCO OpenServer
SCO OpenServer 5.0.x Openssh 3.6p1 loginrec.c writes incorrect data into the ut_id field of the utmp file. This has been an issue since at least openssh 3.0.2 but I never bothered to report it. For Openssh 3.6p1, defining WITH_ABBREV_NO_TTY corrects the problem. Below is a brief patch to configure which does this. You can observe the errant results in the "Line" column from the