Articles by Chris Carbone

Filtering Complex Data with R

August 27, 2020 | Chris Carbone

Filtering Base R has a function filter that can perform moving average (MA) or filters (AR). But it cannot do both at the same time; it cannot do an autoregresive ARMA filter. It also only works on real data. The filter function in the signal package can perform ARMA filters, ...
[Read more...]

Dungeons and Dragons: Advantage

June 24, 2020 | Chris Carbone

D20 and Random Events In the game Dungeons and Dragons, the success or failure of an event is determined by rolling a 20 sided die (D20): higher is better. If you need to roll 11 or higher you have a 50% chance of success. If another event requires 10 or better you now have ...
[Read more...]

Complex Normal Samples In R

June 20, 2020 | Chris Carbone

Normal Samples If we want 10 samples from a Gaussian or normal random process with variance 4 can use rnorm(10,sd=2). Remember the standard deviation (sd) is the square root of the variance. set.seed(2)x [Read more...]

Book Review: Advanced R

July 29, 2019 | Chris Carbone

When I first started using R, my code looked just like MATLAB code. I read an intro to R programming, did some data analysis using R, and I was using the arrow assignment operator! But otherwise, my R code looked very much like MATLAB. Then I read Advanced R by ... [Read more...]

Blackman-Tukey Spectral Estimator in R

June 26, 2019 | Chris Carbone

Blackman-Tukey Spectral Estimator in R! There are two definitions of the power spectral density (PSD). Both definitions are mathematically nearly identical and define a function that describes the distribution of power over the frequency components in our data set. The periodogram PSD estimator is based on the first definition of ...
[Read more...]

Periodogram with R

June 13, 2019 | Chris Carbone

Periodogram with R The power spectral density (PSD) is a function that describes the distribution of power over the frequency components composing our data set. If we knew the process that generated the data, we could just calculate the PSD; we would not have to estimate it. Unfortunately, in practice ...
[Read more...]

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)