Displaying 2 results from an estimated 2 matches for "alongway".
2006 Oct 21
2
problem with mode of marginal distriubtion of rdirichlet{gtools}
Hi all,
I have a problem using rdirichlet{gtools}.
For Dir( a1, a2, ..., a_n), its mode can be found at $( a_i -1)/ (
\sum_{i}a_i - n)$;
The means are $a_i / (\sum_{i} a_i ) $;
I tried to study the above properties using rdirichlet from gtools. The code
are:
##############
library(gtools)
alpha = c(1,3,9) #totoal=13
mean.expect = c(1/13, 3/13, 9/13)
mode.expect = c(0, 2/10, 8/10) #
2006 Oct 25
1
How to specify a constant in gnls{nlme}
Hi All,
I have question about speficifying a constant in gnls() from package nlme.
Here is a testing code:
#############
library(nlme)
x = exp( rnorm(100))
y = 1/(1+x) + rnorm(100)/10
plot( y ~ x)
fm1 = gnls( y ~ 1/(1+(x/v)^w), start=list( v=1, w=1))
a =1; b=1;
fm2 = gnls( y ~ a/(b+(x/v)^w), start=list( v=1, w=1)) #This won't work
because I don't know to set $a$ and $b$ as