Skip to content
Prev 364323 / 398500 Next

curve() doesn't seem to use the whole range of x? And Error: longer object length is not a multiple of shorter object length

Okay here?s a pretty short code to reproduce it:

data <- read.table("http://users.jyu.fi/~slahola/files/glm1_datoja/yoruotsi.txt", header=TRUE)
attach(data)

fit2 <- lm(ruotsi.pist ~ mies + koulu + lka + koulu*clka)

bs <- coef(fit2)

varitB <- c(data[koulu == 'B',]$mies)
varitB[varitB == 0] = 2
plot(data[data$koulu == 'B',]$lka, data[koulu == 'B',]$ruotsi.pist, col=varitB, pch=16, xlab='', ylab='', main='Lukio B?)

curve(bs["(Intercept)"]+bs["mies"]*0+bs["kouluB"]+bs["lka"]*x+bs["kouluB:clka"]*clka, from=min(lka), to=max(lka), add=TRUE, col='red')

Thread (15 messages)

Matti Viljamaa curve() doesn't seem to use the whole range of x? And Error: longer object length is not a multiple of shorter object length Sep 25 Matti Viljamaa curve() doesn't seem to use the whole range of x? And Error: longer object length is not a multiple of shorter object length Sep 25 Duncan Murdoch curve() doesn't seem to use the whole range of x? And Error: longer object length is not a multiple of shorter object length Sep 25 mviljamaa curve() doesn't seem to use the whole range of x? And Error: longer object length is not a multiple of shorter object length Sep 25 Jeff Newmiller curve() doesn't seem to use the whole range of x? And Error: longer object length is not a multiple of shorter object length Sep 25 mviljamaa curve() doesn't seem to use the whole range of x? And Error: longer object length is not a multiple of shorter object length Sep 25 Jeff Newmiller curve() doesn't seem to use the whole range of x? And Error: longer object length is not a multiple of shorter object length Sep 25 Matti Viljamaa curve() doesn't seem to use the whole range of x? And Error: longer object length is not a multiple of shorter object length Sep 25 Jeff Newmiller curve() doesn't seem to use the whole range of x? And Error: longer object length is not a multiple of shorter object length Sep 25 Matti Viljamaa curve() doesn't seem to use the whole range of x? And Error: longer object length is not a multiple of shorter object length Sep 25 Jeff Newmiller curve() doesn't seem to use the whole range of x? And Error: longer object length is not a multiple of shorter object length Sep 25 Matti Viljamaa curve() doesn't seem to use the whole range of x? And Error: longer object length is not a multiple of shorter object length Sep 26 Matti Viljamaa curve() doesn't seem to use the whole range of x? And Error: longer object length is not a multiple of shorter object length Sep 26 Greg Snow curve() doesn't seem to use the whole range of x? And Error: longer object length is not a multiple of shorter object length Sep 26 Jeff Newmiller curve() doesn't seem to use the whole range of x? And Error: longer object length is not a multiple of shorter object length Sep 26