User Tools

Site Tools


r:dummy_variables_with_significant_interaction

This is an old revision of the document!


college <- read.csv("http://commres.net/wiki/_media/r/college.csv")
attach(college)
str(college)
head(college)

salary <- salary / 1000

public<-factor(public, c(0,1), labels=c('Private', 'Public'))
location<-factor(location, c(1,2,3,4), labels=c('S', 'MW','NE', 'W'))

m1 <- lm(salary~public+location)
m2 <- lm(salary~public*location)
summary(m1)
summary(m2)
r/dummy_variables_with_significant_interaction.1685636580.txt.gz · Last modified: 2023/06/02 01:23 by hkimscil

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki