Post has attachment

I'd love to see a companion code walk through with R.

Post has attachment

New post on the blog:

Comparing smooths in factor-smooth interactions II

This time I look at how to use ordered factors w by-variable smooth, to fit a reference smooth plus difference smooths for the other levels

https://www.fromthebottomoftheheap.net/2017/12/14/difference-splines-ii/ #rstats #mgcv #R #statistics

Comparing smooths in factor-smooth interactions II

This time I look at how to use ordered factors w by-variable smooth, to fit a reference smooth plus difference smooths for the other levels

https://www.fromthebottomoftheheap.net/2017/12/14/difference-splines-ii/ #rstats #mgcv #R #statistics

Post has attachment

Just discovered: R tutorials by the University of Edinburgh's Coding Club https://ourcodingclub.github.io/tutorials/

Post has attachment

Post has attachment

This has been an intriguing series to keep up with. #sem

Post has shared content

Yesterday, at the last meeting of the Hamburg R User Group in this year, I had the pleasure to give a talk about Bayesian modelling and choosing (informative) priors in the rstanarm-package. You can download the slides of my talk here. Thanks to the Stan…

Post has attachment

#VanwardStatistics offers #statisticalservices to businesses, doctoral students, the general public, and to researchers in various fields. Check out more at: http://vanwardstat.com/about.html

Post has attachment

Somebody using tablet or iPad to use RStudio.cloud application?

I'm having trouble interpreting lm outputs and choosing best lm for a given set of data

###

HELP NEEDED:

I am trying to create a variable based on the smallest value of the other three variables, then generate a second variable to indicate where the value is from. I used the following codes but it did not work due to the NA:

###

require(dplyr)

A <- c(NA, 1, 2, 3, NA)

B <- c(1, 2, 3, NA, NA)

C <- c(3, 3, 1, 1, NA)

dat <- data.frame(cbind(A, B, C)) %>%

mutate(M = pmin(A, B, C, na.rm = TRUE)) %>%

mutate(N = ifelse(M == A, "A",

ifelse(M == B, "B",

ifelse(M == C, "C", NA))))

HELP NEEDED:

I am trying to create a variable based on the smallest value of the other three variables, then generate a second variable to indicate where the value is from. I used the following codes but it did not work due to the NA:

###

require(dplyr)

A <- c(NA, 1, 2, 3, NA)

B <- c(1, 2, 3, NA, NA)

C <- c(3, 3, 1, 1, NA)

dat <- data.frame(cbind(A, B, C)) %>%

mutate(M = pmin(A, B, C, na.rm = TRUE)) %>%

mutate(N = ifelse(M == A, "A",

ifelse(M == B, "B",

ifelse(M == C, "C", NA))))

Wait while more posts are being loaded