search for: avgpric

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

Did you mean: avgprice
2012 Jan 04
0
Non Negative Least Squares Regression with nnls
...nteractions by doing (a*b). How do I model interactions with nnls? Any workarounds to manually perform interactions if no built-in way? I'm not a statistician; any links to references are highly appreciated as are any relevant workarounds or alternative approaches. Code: library(nnls) #data avgprice <- c(116.0666667,145.1034483,145.75,131.6666667,113.8163265,122.7142857,120.5882353) stars <- c(2.5,2.5,2.5,2.5,3,3,3) lookahead <- c(2,30,60,15,2,30,60) #regular regression reg1 <- lm(avgprice ~ stars + lookahead + stars*lookahead) summary(reg1) #Non-negative s<-cbind(stars,looka...