[R] Weighted Kaplan-Meier estimates using survey::svykm and survival::survfit

2015-01-26 Thread Youyi Fong
Hello, is there a way to convert a svykm object returned by survey::svykm into a survfit object? The reason I am asking is that plot.survfit can plot different transformations of survival curves, a functionality that is currently not afforded by plot.svykm. Thanks! Youyi [[alternative HTML

[R] match.arg: how to prevent users from not specifying a value

2015-08-19 Thread Youyi Fong
Hello, I have a function that looks like f=function( type=c("dummy,"A","B,"C"), ... ) { type<-match.arg(type) if (type=="dummy") stop("Please choose a type that is not dummy.") ... } I put a "dummy" in the list of choices as a mechanism to prevent users from not specifying a value for

Re: [R] match.arg: how to prevent users from not specifying a value

2015-08-19 Thread Youyi Fong
, "C")) >>} >>f1() >>#Error in match.arg(type, c("A", "B", "C")) : >># argument "type" is missing, with no default >>f1("X") >>#Error in match.arg(type, c("A", &quo

[R] syvcoxph and cox.zph for testing the PH assumption

2021-07-10 Thread Youyi Fong
Hello, is it kosher to call cox.zph on a syvcoxph model fit? I see that someone proposed a modified version of cox.zph that uses resid(fit, 'schoenfeld', **weighted=TRUE**). https://stats.stackexchange.com/questions/265307/assessing-proportional-hazards-assumption-of-a-cox-model-with-caseweights I

Re: [R] syvcoxph and cox.zph for testing the PH assumption

2021-07-12 Thread Youyi Fong
Thank you, Terry. We look forward to hearing from you again. Youyi On Mon, Jul 12, 2021 at 3:13 PM Therneau, Terry M., Ph.D. wrote: > > > On 7/11/21 5:00 AM, r-help-requ...@r-project.org wrote: > > Hello, is it kosher to call cox.zph on a syvcoxph model fit? I see that > > someone proposed a mod

[R] .Call using multiple cores on linux after R 3.3.3

2019-04-20 Thread Youyi Fong
Hi, I am wondering why it is the case that in R 3.3.3, calling chngpt:chngptm uses only 1 core, but in later releases, e.g. R 3.4.3, it uses multiple cores on linux. The function chngpt:chngptm has a .Call to invoke a C/C++ function that performs bootstrapping. No explicit parallel computing instru

Re: [R] .Call using multiple cores on linux after R 3.3.3

2019-04-25 Thread Youyi Fong
ote: > My guess would be that you are running with a non-CRAN distribution of R > like Anaconda or MRAN that has MKL enabled? > > On April 19, 2019 10:25:57 AM PDT, Youyi Fong wrote: > >Hi, I am wondering why it is the case that in R 3.3.3, calling > >chngpt:chngptm uses

[R] Rprintf and "C stack usage is too close to the limit"

2008-06-12 Thread Youyi Fong
is problem has been bugging me for a few days now. Youyi -- Youyi Fong, Graduate Student, Department of Biostatistics University of Washington, Box 357232, Seattle, WA 98195 [[alternative HTML version deleted]] __ R-help@r-project.org mailing

[R] GLMM, ML, PQL, lmer

2009-02-15 Thread Youyi Fong
help! Youyi Fong ----- Youyi Fong, Graduate Student, Department of Biostatistics University of Washington, Box 357232, Seattle, WA 98195 [[alternative HTML version deleted]] ___