Displaying 2 results from an estimated 2 matches for "simpres".
Did you mean:
simples
2023 Aug 31
1
simulating future observations from heteroscedastic fits
Hello, All:
I want to simulate future observations from fits to heteroscedastic
data. A simple example is as follows:
(DF3_2 <- data.frame(y=c(1:3, 10*(1:3)),
gp=factor(rep(1:2, e=3))))
# I want to fit 4 models
# and simulate future observations from all 4:
fit11 <- lm(y~1, DF3_2)
fit21 <- lm(y~gp, DF3_2)
library(nlme)
(fit12 <- lme(y~1, data=DF3_2,
2002 Jan 25
0
Simplex difficulties
...e = 8
c + f = 7
I've implemented this in R (1.4.0 (2001-12-19), SunOS 5.7) as:
require(boot)
costs = c(8,6,10,9,5,7)
constraints = c(
1,1,1,0,0,0,
0,0,0,1,1,1,
1,0,0,1,0,0,
0,1,0,0,1,0,
0,0,1,0,0,1
)
consmat = matrix(constraints, nrow=5, ncol=6, byrow=T)
consrhs = c(11,14,10,8,7)
simpres = simplex(a=costs, A3=consmat, b3=consrhs, maxi=F)
where I get the error from the simplex function:
Error in simplex1(out1$a[1:(n + m1 + m2)], out1$A[, 1:(n + m1 +
m2)], :
subscript out of bounds
According to Gass (An Illustrated Guide to Linear Programming) the
solution should be a=10, b=1...