search for: simpr

Displaying 2 results from an estimated 2 matches for "simpr".

Did you mean: simpy
2023 Aug 31
1
simulating future observations from heteroscedastic fits
...ry(nlme) (fit12 <- lme(y~1, data=DF3_2, random=~1|gp)) (fit22 <- lme(y~gp, data=DF3_2, random=~1|gp)) library(lme4) (fit12r <- lmer(y~1+(1|gp), data=DF3_2, REML=FALSE)) (fit22r <- lmer(y~gp+(1|gp), data=DF3_2, REML=FALSE)) # I can simulate what I want for fit11 and fit21 # as follows: simPred <- function(object, nSims=2){ pred <- predict(object, DF3_2[6,], se.fit=TRUE, interval='prediction') with(pred, fit[1, 'fit'] + se.fit*rt(nSims, df)) } simPred(fit11) simPred(fit21) # How can I do the same with either fit12 and fit22 # or...
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...