[R] help in identifying the argument formula in the package nnet

2010-01-28 Thread CJ Rubio
network.. I am aware that my model should be Q(t) ~ Q(t-1) + Q(t-2) + Q(t-3). But I can't seem to figure out how to express this in a formula that R would recognize. Any help, suggestions and comments to enlighten me will be truly appreciated. CJ Rubio -- View this message in context: http

[R] how to express time series linear model Q(t) ~ Q(t-1)+.. Q(t-n) as a formula

2010-01-28 Thread CJ Rubio
For example I have a time series Q(t) ~ Q(t-1) + Q(t-2) + Q(t-3) meaning that my current value is dependent to the 3 previous values. Can anybody help me express this in a formula that I can use for my neural network model (I am planning to use packages nnet and MASS) -- View this message in

[R] how to create normal qqplot with the 95% confidence interval

2009-12-23 Thread CJ Rubio
hi everyone! season's greetings! is there any way that i can create a normal qqplot showing, aside from the qqline, the 95% confidence limits? thank you very much.. happy holidays! -- View this message in context:

Re: [R] how to create normal qqplot with the 95% confidence interval

2009-12-23 Thread CJ Rubio
thank you very much! this is just what my professor was asking for. Walmes Zeviani wrote: Rubio, Look at library(fBasics) the function qqnormPlot(). Below an example: qqnormPlot(rnorm(100)) Best's Walmes Zeviani, Brasil. CJ Rubio wrote: hi everyone! season's

[R] simulating AR() using a

2009-10-21 Thread CJ Rubio
good day everyone! i have a time series (andong.ts) and fitted and AR() model using the following code andong.ts - ts(read.table(D:/.../andong.csv, header = TRUE), start = c(1966,1), frequency = 1) ar(andong.ts) Call: ar(x = andong) Coefficients: 1 2 3 0.3117 0.0607

[R] help in simulating AR models

2009-10-21 Thread CJ Rubio
good day everyone! i have a time series (andong.ts) and fitted and AR() model using the following code andong.ts - ts(read.table(D:/.../andong.csv, header = TRUE), start = c(1966,1), frequency = 1) ar(andong.ts) Call: ar(x = andong) Coefficients: 1 2

[R] acf for a univariate time series in a data frame

2009-10-08 Thread CJ Rubio
hi everyone! i want to check the autocorrelation function for a univariate time series (streamflow) in a data frame as below: DF - read.table(D:/file path) DF year jan feb mar apr .. dec 1966 0.504 0.406 0.740 0.241 0.429 1967 0.683 0.529

Re: [R] acf for a univariate time series in a data frame

2009-10-08 Thread CJ Rubio
*additional: the lags i am expecting is in months.. since i am trying to predict monthly streamflow. thanks again -- View this message in context: http://www.nabble.com/acf-for-a-univariate-time-series-in-a-data-frame-tp25799751p25799784.html Sent from the R help mailing list archive at

[R] neural network arguments

2009-10-07 Thread CJ Rubio
hi everyone! my inquiry with neural network is rather basic. i am just learning neural network, particularly the VR bundle. i read the documentations for the said bundle but still is struggling on understanding some arguments - x is the matrix or data frame of x values for example does this

[R] overwritten plots in pdf file

2009-09-29 Thread CJ Rubio
i am having a problem in saving plots in pdf. i have this code below and it only shows me the last plot. i tried keeping my devices open by removing dev.off() from the code but the pdf file won't open for (i in 1:n) { . . . pdf(D:/research/plot.pdf) plot(mon, mu, type ='o') dev.off() } my for

[R] problem with dates in zoo package

2009-02-17 Thread CJ Rubio
i have the following code - assimilating the maximum annual discharge each year ffrom a daily discharge record from year 1989-2005. m - read.table(D:/documents/5 stations/01014000.csv, sep =,) z - zoo(m[,4],as.Date(as.character(m[,3]), %m/%d/%Y)) x - aggregate(z,

[R] rbind: number of columns of result is not a multiple of vector length (arg 1)

2009-02-17 Thread CJ Rubio
i have the following constructed and running very well,, thanks to Gabor Grothendieck for his help. data.info - c(station.id, year, date, max.discharge) for(i in 1:num.files) { + station.id - substring(data[i], 1,8) + DF - read.table(data[i], sep=,, blank.lines.skip = TRUE) + z - zoo(DF[,4],

Re: [R] rbind: number of columns of result is not a multiple of vector length (arg 1)

2009-02-17 Thread CJ Rubio
, date, max.discharge)) On Tue, Feb 17, 2009 at 9:26 PM, CJ Rubio cjru...@kongju.ac.kr wrote: i have the following constructed and running very well,, thanks to Gabor Grothendieck for his help. data.info - c(station.id, year, date, max.discharge) for(i in 1:num.files) { + station.id

[R] basic inquiry regarding write.csv

2009-02-17 Thread CJ Rubio
i have a loop which looks likes this: data.info - rbind(data.info, cbind(station.id, year, date, max.discharge)) + y - split(data.info, data.info[station.id]) + for (i in names(y)) {write.csv(y[[i]], file=paste(i, .csv, sep=,))} i am wondering, where the file (which i am about to

Re: [R] basic inquiry regarding write.csv

2009-02-17 Thread CJ Rubio
, then it should be in the working directory. Say, the working directory is E:/my_work_directory (of course, you can get it by getwd()), and you export a data frame a to csv by: write.csv(a, file=a.csv), then the file should be E:/my_work_directory/a.csv. Best 2009/2/18 CJ Rubio cjru

Re: [R] basic inquiry regarding write.csv

2009-02-17 Thread CJ Rubio
the sep= will be more elegant that sep=,. Are you sure your working directory is E:/my_work_directory? and is there any error msg? BTW, a reproducible example will help to get better response from the list. 2009/2/18 CJ Rubio cjru...@kongju.ac.kr: thanks for your reply.. is there something wrong

[R] annual maximum value

2009-02-16 Thread CJ Rubio
hi everyone! hope you can help me here. i am a new R user. what i am trying to do is to find the maximum annual discharge from a daily record. i have a data.frame which includes date and the discharge. somewhat like this.. 10/1/1989 2410 10/2/1989 2460 10/3/1989 2890 ... ...

Re: [R] annual maximum value

2009-02-16 Thread CJ Rubio
)) x - aggregate(z, cut(time(z),y), max) i got the maximum values right using coredata(), my question now is, how can i call for the complete date (-mm-dd) and the year () when the maximum observation for that year was observed? CJ Rubio wrote: hi everyone! hope you can help