Displaying 2 results from an estimated 2 matches for "s_hat".
Did you mean:
b_hat
2011 Feb 16
1
speed up the code
Hi All,
The following is a snippet of my code. It works fine but it is very slow. Is it possible to speed it up by using different data structure or better solution? For 40000 runs, it takes 8 minutes now. Thanks a lot
fun_activation = function(s_k, s_hat, x_k, s_hat_len)
{
common = intersect(s_k, s_hat);
if(length(common) != 0)
{
index = match(common, s_k);
round(sum(x_k[index]) * length(common) / (s_hat_len * length(s_k)), 3);
}
else
{
0;
}
}
fun_x = function(a)
{
round(runif(length(a), 0,...
2006 Mar 08
2
Survival Plots by Strata
...eleased (let out of pens) into the wild (2 year
data snip below). 'Entry' (e.g., day of year the first bird is
released for each year) is highly variable, ranging from 48 to >250.
When I create a plot using the below code I would like to remove the
'solid' line which represent S_hat=1 out to the LC point for each year
and instead have the survival curves formatted in more of a 'hanging'
style, where the LC day (e.g., min(Entry for each year)) is where each
curve begins at S_hat=1 for each year (and does not extend back to the
y-axis)? I could not find anything on this...