Skip to content

Instantly share code, notes, and snippets.

@jcheong0428
Created December 19, 2019 15:46
Show Gist options
  • Select an option

  • Save jcheong0428/fd7d079369b3adf907a0bfb36133771d to your computer and use it in GitHub Desktop.

Select an option

Save jcheong0428/fd7d079369b3adf907a0bfb36133771d to your computer and use it in GitHub Desktop.
contrasts(data$Gender) <- c(-.5,.5)
m <- lm('Income~Age*Gender',data=data)
summary(m)
@ShaowenJ
Copy link
Copy Markdown

Hi Jinhyun, thanks for your blog, I found very helpful.
Actually, I have a question regarding on centered the contrasts at 0, what if I have multiple categorical variables? how should I set them at 0?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment