search for: assign2

Displaying 7 results from an estimated 7 matches for "assign2".

Did you mean: assign
2010 Nov 11
2
Adding meta-data when creating objects. e.g: changing "<-" so to (for example) add "creation time" - how-to and pros/cons?
My objective is to start having meta-data on objects that I create. For example, consider the following function: assign2 <- function(x, ...) { assign("x", ...) attr(x, "creation time") <- Sys.time() x <<- x } assign2("x", 1:4) "assign2" assigns to x the vector 1:4, and it then also adds the creation time of the object. (Hat tip goes to Peter Alspach for pointin...
2020 Feb 14
2
Given one restrict pointer based on another, should they never alias?
...`x`; hence, the compiler will assume that accesses *x and *y might alias: void assign1(int *pA, long N) { int *restrict x = pA; { int *y = x + N; *x = *y; } } However, what if y itself is declared "restrict": can the compiler assume that *x and *y will never alias? void assign2(int *pA, long N) { int *restrict x = pA; { int *restrict y = x + N; *x = *y; } } Both Jeroen's and Hal's implementation (the intrinsic-based one) will say "NoAlias" for the accesses in assign2() but shouldn't x and y be in the same restrictness "bucket&quot...
2020 Feb 20
2
Given one restrict pointer based on another, should they never alias?
...gt; > > For 'assign1': > > - x is a restrict pointer and is assumed to point to its own set of objects > > - y is a normal pointer, based on x > > - all access to the set of objects pointed by x are done through a pointer > based on x > > > > for 'assign2': > > - x is a restrict pointer and is assumed to point to its own set of objects > > - y is also a restrict pointer, based on x, but it is assumed to point to > its own set of objects for the scope of y > > - because of that, *x and *y must never overlap, as all accesses t...
2011 Apr 08
1
Variance of random effects: survreg()
I have the following questions about the variance of the random effects in the survreg() function in the survival package: 1) How can I extract the variance of the random effects after fitting a model? For example: set.seed(1007) x <- runif(100) m <- rnorm(10, mean = 1, sd =2) mu <- rep(m, rep(10,10)) test1 <- data.frame(Time = qsurvreg(x, mean = mu, scale= 0.5, distribution =
2007 Apr 17
3
Extracting approximate Wald test (Chisq) from coxph(..frailty)
Dear List, How do I extract the approximate Wald test for the frailty (in the following example 17.89 value)? What about the P-values, other Chisq, DF, se(coef) and se2? How can they be extracted? ######################################################> kfitm1 Call: coxph(formula = Surv(time, status) ~ age + sex + disease + frailty(id, dist = "gauss"), data = kidney)
2010 Dec 02
0
survival - summary and score test for ridge coxph()
...k" "iter" "linear.predictors" "residuals" [8] "means" "method" "df" "df2" "penalty" "pterms" "assign2" [15] "history" "coxlist2" "printfun" "n" "terms" "assign" "wald.test" [22] "y" "formula" &qu...
2011 Jul 20
0
Cleveland Dot plots: tick labels and error bars
...nel has its own y and x axis tick labels. I would like the figure panels to fit to gether like this simple figure. 2nd issue: I'd like to create standard error bars for each point. The most direct option I've observed is from: http://www.unc.edu/courses/2010fall/ecol/563/001/docs/solutions/assign2.htm It seems to use the following panel function to create 95% conf. intervals: panel=function(x,y) { panel.grid(v=0, h=-6, lty=3) panel.segments(new.data$lower95, as.numeric(y), new.data$upper95, as.numeric(y), lty=1, col=1) panel.segments(new.data$lower50, as.numeric(y), new.data$upper50,...