search for: distributionautocorrelation_expect

Displaying 4 results from an estimated 4 matches for "distributionautocorrelation_expect".

2018 Oct 05
2
Bug : Autocorrelation in sample drawn from stats::rnorm (hmh)
On 05/10/2018, 09:45, "R-help on behalf of hmh" <r-help-bounces at r-project.org on behalf of hugomh at gmx.fr> wrote: Hi, Thanks William for this fast answer, and sorry for sending the 1st mail to r-help instead to r-devel. I noticed that bug while I was simulating many small random walks using c(0,cumsum(rnorm(10))). Then the negative
2018 Oct 04
2
Bug : Autocorrelation in sample drawn from stats::rnorm (hmh)
...on _when the sample that is drawn is small_.#?# I describe the problem using two functions:# ??# ? DistributionAutocorrelation_Unexpected which as the wrong behavior :?# ? _when drawing some small samples using rnorm, there is generally a?# strong negative auto-correlation in the sample_.#?# and#?# DistributionAutocorrelation_Expected which illustrate the expected behavior#?#?#?# *Unexpected : *# ??# ? DistributionAutocorrelation_Unexpected = function(SampleSize){# ? ? Cor = NULL# ? ? for(repetition in 1:1e5){# ? ? ? X = rnorm(SampleSize)# ? ? ? Cor[repetition] = cor(X[-1],X[-length(X)])# ? ? }# ? ? return(Cor)# ? }#?# par(mfr...
2018 Oct 04
2
Bug : Autocorrelation in sample drawn from stats::rnorm (hmh)
...on _when the sample that is drawn is small_.#?# I describe the problem using two functions:# ??# ? DistributionAutocorrelation_Unexpected which as the wrong behavior :?# ? _when drawing some small samples using rnorm, there is generally a?# strong negative auto-correlation in the sample_.#?# and#?# DistributionAutocorrelation_Expected which illustrate the expected behavior#?#?#?# *Unexpected : *# ??# ? DistributionAutocorrelation_Unexpected = function(SampleSize){# ? ? Cor = NULL# ? ? for(repetition in 1:1e5){# ? ? ? X = rnorm(SampleSize)# ? ? ? Cor[repetition] = cor(X[-1],X[-length(X)])# ? ? }# ? ? return(Cor)# ? }#?# par(mfr...
2018 Oct 05
0
Bug : Autocorrelation in sample drawn from stats::rnorm (hmh)
...> Please check thoroughly the code of the 1st mail I sent, there should be no difference between the two R functions I wrote to illustrate the bug. > The two functions that should produce the same output if there would be no bug are 'DistributionAutocorrelation_Unexpected' and 'DistributionAutocorrelation_Expected'. >Please take the time to compare there output!! >The finite-sample bias in the sample autocorrelation coefficient you mention should affect them in the same manner. This bias is not the only phenomenon at work, there is ALSO as BUG ! I disagree. Take a look at your code: Cor[repetiti...