search for: lower1

Displaying 3 results from an estimated 3 matches for "lower1".

Did you mean: lower
2009 Nov 16
1
object not found inside step() function
...e("y~1+",paste(grep("X.*",names(a),value=T),collapse="+"),sep="") if(is.null(force.in)!=T){ lowmo<-paste("y~1+",paste(grep("X.*",names(a)[force.in],value=T),collapse="+"),sep="") } else {lowmo<-"y~1"} lower1<-glm(lowmo,family="binomial",data=data.frame(a,y)) upper1<-glm(form,family="binomial",data=data.frame(a,y)) stepout<-step(lower1,scope=list(lower=lower1,upper=upper1),direction="forward",k=0,trace=100) # here is the error:Start: #AIC=689.62 #y ~ 1 #Error in...
2010 Jun 13
1
using latticeExtra plotting confidence intervals
...I am not sure what to have to the left side of the formula. This is the example code: library(lattice) library(latticeExtra) sample1<-rnorm(100,10,2) sample2<-rnorm(100,50,3) sample3<-rnorm(100,20,2) sample4<-rnorm(100,40,1) mu1<-mean(sample1) ci.upper1<-mu1+2*2 ci.lower1<-mu1-2*2 mu2<-mean(sample2) ci.upper2<-mu2+2*3 ci.lower2<-mu2-2*3 mu3<-mean(sample3) ci.upper3<-mu3+2*2 ci.lower3<-mu3-2*2 mu4<-mean(sample4) ci.upper4<-mu4+2*1 ci.lower4<-mu4-2*1 categories<-c("A","B") mu<-cbind(mu1,mu2,mu3,mu4)...
2008 Jun 17
2
constrOptim with method = "L-BFGS-B"
...9, 0.0001285479414542, 0.0000714719761291, 0.0000394986211508, 0.0000151312169512, 0.0001299625832782, 0.0004355778955394), c(16,16)) covar <- function(x) return (t(x) %*%mat %*% (x)) covargr <- function(x) return ( 2*mat %*% (x)) upper1 = c(1, 0, 0, 0, 0, 0, 0,0 ,0 , 0, 0, 0, 0, 0, 0, 0) lower1 = c(1, -0.25, -0.25, -0.25, -0.25, -0.25, -0.25, -0.25, -0.25, -0.25, -0.25, -0.25, -0.25, -0.25, -0.25, -0.25) lower[1] = 1 init = upper1- 1/15.0 init[1] = 1 optim( init, covar, covargr, method = "L-BFGS-B", lower = lower1, upper = upper1) u1 <- c(0, 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,...