search for: temp_rng

Displaying 1 result from an estimated 1 matches for "temp_rng".

Did you mean: temp_reg
2012 Jan 13
1
plotting regression line in with lattice
...)) #and this model that fits them lm <- lm(var ~ temp * subj, data = mydata) #i want to plot the results with lattice anf fit the regression line, predicted with my model, trough them #to do so, I'm using this approach, outlined "Lattice Tricks for the power useR" by D. Sarkar temp_rng <- range(mydata$temp, finite = TRUE) grid <- expand.grid(temp = do.breaks(temp_rng, 30), subj = unique(mydata$subj), trt = unique(mydata$trt)) model <- cbind(grid, var = predict(lm, newdata = grid)) orig <- mydata[c("var","temp&q...