Displaying 2 results from an estimated 2 matches for "svec1".
Did you mean:
vec1
2005 Nov 17
1
Morans I for Spatial Surveillance
...is I would alo appreciate it as I am rather new to R!
Thanks
Serryn
T1<-read.dbf("ob.dbf")
N <- colnames(T1)
T2nb <- read.gal("PC.gal",override=TRUE)
col.W <- nb2listw(T2nb, style="W")
for(i in seq(N)) {
Vec1 <- spNamedVec(N[i+7], T1)
Svec1<-sum(Vec1)
ifelse ( Svec1> 0, res[i]<-moran.test(spNamedVec(N[i+7], T1), col.W, zero.policy=TRUE), res[i]<-"NULL")
}
print(res)
[[alternative HTML version deleted]]
2010 Mar 24
0
optimize a joint lieklihood with mle2
...know how to write the correct argument for the
mle2 function. Here is what I've tried:
##################################
the lieklihood function to be optimized is called mfun(logN, s, h=h,
cohort=cohort). I want to maximize the vectors logN and s. I define the
starting values for logN as svec1 and for s as svec2
then I write for the optimization:
m1 = mle2(mfun,start=list(svec1=logN,svec2=s),
method="L-BFGS-B",lower=lower,upper=10,
vecpar=TRUE,
data=list(h=h,cohort=cohort))
but I get the error:
Error in mle2(mfun, start = list(svec1 = logN, svec2 = s), method =
&...