Displaying 3 results from an estimated 3 matches for "nk2".
Did you mean:
nb2
2016 Apr 22
0
R2BayesX help
...mple,0,1)
x4.tot<-runif(nsample,0,1)
x5.tot<-runif(nsample,0,1)
x6.tot<-runif(nsample,0,1)
x7.tot<-runif(nsample,0,1)
pnoise<-0.2
eta<-f2(x1.tot,x2.tot,x3.tot,x4.tot)
y.tot<-eta+pnoise*rnorm(nsample,0,1)
d<-data.frame(y.tot,x1.tot,x2.tot,x3.tot,x4.tot,x5.tot,x6.tot,x7.tot)
nk2<-5
# the full model that contains the interactions of all pairs of x1~x7, 21
terms in total
fr2<-y.tot ~ sx(x1.tot, x2.tot, knots = nk2, bs = "te") + sx(x1.tot,
x3.tot, knots = nk2, bs = "te") +
sx(x1.tot, x4.tot, knots = nk2, bs = "te") + sx(x1.tot, x5.tot, k...
2013 Mar 26
2
NaNS Error Message
...ippet of my code:
k goes from 1 to a positive limit.
S is always 100.
Only positive values of n are allowed into the loop.
if(n>0)
{
while(k<=lim)
{
sn<-(S-n);snfact<-gamma(sn);
sn2<-(2-n+S);sn2gam<-gamma(sn2);
num<-(ngam*sn2gam);
nk2<-(2+k-(2*n)+S);
nk2gam<-gamma(nk2);
den<-(k*nk2gam);
prob<-(num/den);
sum<-(as.numeric((k*prob))+sum);
k<-k+1;
}
}
The error message received for every instance of this loop is :
In gamma(sn) : NaNs produced
In gamma(sn2) : N...
2004 Aug 30
3
D'agostino test
Hi, Does anyone know if the D'agostino test is available with R ?
Alex