Re: [R] SVAR: error message

2018-10-23 Thread Amit Mittal
I had no problem using svar () I think you should try the code examples in the var package PDF by the authors, the research has since been quoted successfully Amit Mittal PhD in Finance and Accounting (tbd) IIM Lucknow http://ssrn.com/author=2665511 *Top 10%, downloaded author since

Re: [R] SVAR: error message

2018-10-23 Thread John
If it is an A model, then should I just set B = NULL or skip the entry B? William Dunlap 於 2018年10月24日 週三 上午4:14寫道: > The immediate problem is in svartype=="AB-model" part of SVAR: > > pos <- which(is.na(rb)) > cols <- length(pos) > Rb <- matrix(0, nrow = Ksq,

Re: [R] SVAR: error message

2018-10-23 Thread William Dunlap via R-help
The immediate problem is in svartype=="AB-model" part of SVAR: pos <- which(is.na(rb)) cols <- length(pos) Rb <- matrix(0, nrow = Ksq, ncol = cols) for (i in 1:cols) Rb[pos[i], i] <- 1 Your Bmat has no NA's, so cols is 0. Then 1:cols is c(1,0), cau

Re: [R] Ignoring the domain of RV in punif()

2018-10-23 Thread Ted Harding
Well, as a final (I hope!) clarification: It is not the case that "the bigger cube does not exists (because the Q is the reference space)". It does exist! Simply, the probability of the random point being in the bigger cube, and NOT in the cube Q, is 0. Hence "the cumulative probability of reachin

Re: [R] Ignoring the domain of RV in punif()

2018-10-23 Thread Hamed Ha
Hi Ted, Thanks for the explanation. I am convinced at least more than average by Eric and your answer. But still have some shadows of confusion that is definitely because I have forgotten some fundamentals in probabilities. In your cube example, the cumulative probability of reaching a point out

Re: [R] Ignoring the domain of RV in punif()

2018-10-23 Thread Ted Harding
Sorry -- stupid typos in my definition below! See at ===*** below. On Tue, 2018-10-23 at 11:41 +0100, Ted Harding wrote: Before the ticket finally enters the waste bin, I think it is necessary to explicitly explain what is meant by the "domain" of a random variable. This is not (though in special

Re: [R] Ignoring the domain of RV in punif()

2018-10-23 Thread Ted Harding
Before the ticket finally enters the waste bin, I think it is necessary to explicitly explain what is meant by the "domain" of a random variable. This is not (though in special cases could be) the space of possible values of the random variable. Definition of (real-valued) Random Variable (RV): Le

Re: [R] Transformations in Tidyverse (renaming and ordering columns)

2018-10-23 Thread Joel Maxuel
I am impressed. Upon playing with factor, I took it a step further to commonize (and this could very well be simpified): > > testset$Observation <- factor(testset$Order, levels=testset$Order, labels=testset$Observation) > testset$Label <- factor(testset$Seq, levels=testset$Seq, labels=testset$Lab

Re: [R] Ignoring the domain of RV in punif()

2018-10-23 Thread Hamed Ha
Yes, now it makes more sense. Okay, I think that I am convinced and we can close this ticket. Thanks Eric. Regards, Hamed. On Tue, 23 Oct 2018 at 10:42, Eric Berger wrote: > Hi Hamed, > That reference is sloppy. Try looking at > https://en.wikipedia.org/wiki/Cumulative_distribution_functi

Re: [R] Ignoring the domain of RV in punif()

2018-10-23 Thread Eric Berger
Hi Hamed, That reference is sloppy. Try looking at https://en.wikipedia.org/wiki/Cumulative_distribution_function and in particular the first example which deals with a Unif[0,1] r.v. Best, Eric On Tue, Oct 23, 2018 at 12:35 PM Hamed Ha wrote: > Hi Eric, > > Thank you for your reply. > > I sho

Re: [R] Ignoring the domain of RV in punif()

2018-10-23 Thread Hamed Ha
Hi Eric, Thank you for your reply. I should say that your justification makes sense to me. However, I am in doubt that CDF defines by the Pr(x <= X) for all X? that is the domain of RV is totally ignored in the definition. It makes a conflict between the formula and the theoretical definition.

Re: [R] Ignoring the domain of RV in punif()

2018-10-23 Thread Eric Berger
Hi Hamed, I disagree with your criticism. For a random variable X X: D - - - > R its CDF F is defined by F: R - - - > [0,1] F(z) = Prob(X <= z) The fact that you wrote a convenient formula for the CDF F(z) = (z-a)/(b-a) a <= z <= b in a particular range for z is your decision, and as you noted th

[R] Ignoring the domain of RV in punif()

2018-10-23 Thread Hamed Ha
Hi All, I recently discovered an interesting issue with the punif() function. Let X~Uiform[a,b] then the CDF is defined by F(x)=(x-a)/(b-a) for (a<= x<= b). The important fact here is the domain of the random variable X. Having said that, R returns CDF for any value in the real domain. I underst

Re: [R] Cannot use R on Windows when installed to an external drive with a space in the path

2018-10-23 Thread Tomas Kalibera
On 10/22/2018 07:15 PM, Ivan Krylov wrote: This is a bin\R.exe + bin\Rscript.exe bug. Please note this has been fixed in later versions of R, quoting has been added. If you can find some corner case in which the current quoting (R-devel) is incorrect on Windows, in the front-ends or anywhere

[R] quantmod::chart_Series() how to simplify x-axis labels?

2018-10-23 Thread Anuj Goyal
Is there a way to easily simplify the x-axis labels for quantmod::chart_Series() https://stackoverflow.com/questions/52910667/quantmodchart-series-how-to-simplify-x-axis-labels [[alternative HTML version deleted]] __ R-help@r-project.org mailin