Displaying 2 results from an estimated 2 matches for "powerb".
Did you mean:
power
2006 Jul 03
2
help a newbie with a loop
...my (more experienced) friends
can not help with with. Why isnt this code working?
The function is working, also with the loop and the graph appears,
only when I build another loop around it (for different values of p) ,
R stays in a loop?
Can't it take more then 2 loops in one program?
powerb<-function(x,sp2,a,b,b1,m)
{ sx<-(sum(x^2)-(sum(x)^2)/length(x))/length(x)
n0<-ceiling((((qnorm(1-(a/2))+qnorm(1-b))/b1)^2)*(((m+1)/m)*sp2/sx))
repeat
{
n1<-ceiling((((qt(1-(a/2),n0-4)+qt(1-b,n0-4))/b1)^2)*(((m+1)/m)*sp2/sx))
if(n0==n1) break
n0<-n1
}...
2011 Oct 28
0
problem with glsm.krige: trendd and trend l must have similar specifications error
...ame error message. The bolded part is the part that doesn't work. Any help would be appreciated!
reddmcmc=glsm.mcmc(geodata, coords=geodata$coords, data=geodata$data,model=list(family="poisson", cov.pars=c(50,8000),beta=c(-26,-.04,6.94),cov.model="spherical",nugget=5,trend=~powerb1+temp1),mcmc.input = mcmc.control(S.scale =.000001 ,thin=10))
prepareredd1=prepare.likfit.glsm(reddmcmc)
lik.redd1.1 <- likfit.glsm(prepareredd1, ini.phi = 10,cov.model = "spherical",trend=~powerb1 + temp1)
# predict at new locations
trendpred=trend.spatial(~habitat2$powerb + habitat2...