search for: upper1

Displaying 4 results from an estimated 4 matches for "upper1".

Did you mean: upper
2008 Jun 17
2
constrOptim with method = "L-BFGS-B"
...1, 0.0003028775764026, 0.0001641280878243, 0.0000352165734549, 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, u...
2010 Jun 13
1
using latticeExtra plotting confidence intervals
...it categorized as two. 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<...
2009 Nov 16
1
object not found inside step() function
...e="+"),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 data.frame(a, y) : object 'a' not found---but "a" is...
2012 Oct 10
3
How to replicate SAS by group processing in R
Hello, I am trying to re-code all my programs from SAS into R. In SAS I use the following code: proc sort data=upper; by tdate stock_symbol expire strike; run; data upper1; set upper; by tdate stock_symbol expire strike; if first.expire then output; rename strike=astrike; run; on the following data set: tdate stock_symbol expiration strike 9/11/2012 C 9/16/2012 11 9/11/2012 C 9/16/2012 12 9/11/2012 C...