[R] Multiply variable by condition
Hi I need to do something very simple. I have 2 variables, Y and M. I need to multiply Y by 1 if M=1, by 2 if M=3 and by 3.6678 if M=9. How do i make it? Thanks for your time and interest -- View this message in context: http://r.789695.n4.nabble.com/Multiply-variable-by-condition-tp4632086.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] garchSim with starting error and variance given?
Hello i need to simulate data for and arch and garch process, n=1000. I've been generating arch and garch data but i can't find the way to set an starting error, epsilon(t=0) and sigma(t=0) to run the command garchSim(). I generated the process on Excel and i know that for the Arch process has a mean of 10 aprox, and for Garch a mean of 25 aprox. The errors comes from a random walk y_t=epsilon_t Thanks for your time and interest. -- View this message in context: http://r.789695.n4.nabble.com/garchSim-with-starting-error-and-variance-given-tp432p432.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] Simulate AR(1) starting from X number?
Hi i run arima.sim(n=100,n.start=9,list(ar=c(0.4)),sd=sqrt(3)), but i need that the firs value be 9, i mean x_(-1). Thanks -- View this message in context: http://r.789695.n4.nabble.com/Simulate-AR-1-starting-from-X-number-tp4276550p4276550.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] Simulate AR(1) starting from X number?
Yes, it's work for my class. -- View this message in context: http://r.789695.n4.nabble.com/Simulate-AR-1-starting-from-X-number-tp4276550p4277462.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] VaR package, where is it?
Hi I need to perform some analysis about risk management portfolio. There is a reference to a VaR package, however, i can't find it. It was deprecated? Or it's inside now of another package? Thanks. -- View this message in context: http://r.789695.n4.nabble.com/VaR-package-where-is-it-tp4206869p4206869.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.