Re: [R] Question about the package "MatchIt"

2020-10-10 Thread Ehsan Karim
Maria: What you are looking for (propensity score matching on survey data) is discussed in lab 5 components of this series using matchit and matching package: https://www.youtube.com/playlist?list=PL2yD6frXhFob_Mvfg21Y01t_yu1aC9NnP Regards, Ehsan https://ehsank.com/ On Fri., Oct. 9, 2020,

[R] svyglm: p-values and confidence intervals contradictory

2020-10-07 Thread Ehsan Karim
Dear list: I am getting p-values and confidence intervals contradictory in svyglm() output from the survey package. Here is a reproducible example: https://ehsanx.github.io/SurveyDataAnalysis/#114_Regression_analysis This problem can be easily fixed by setting appropriate df.resid in the

[R] GLM vs GAM

2014-03-13 Thread Ehsan Karim
Dear R-list, I am wondering whether anyone could explain what'd be the difference between running a 'generalized additive regression' versus 'generalized linear regression' with splines.  Are they same models theoretically? My apologies if this is a silly question. Any comments or direction

[R] Bayes weighted regression?

2012-12-10 Thread Ehsan Karim
Dear List, Just wondering, is there a Bayesian version of weighted regression available in the literature (to handle survey weights, say)? If yes, could you suggest me a reference? Does MCMCregress handle weights? cheers, Ehsan __

[R] coxph data format

2012-05-07 Thread Ehsan Karim
Dear List, Here is an example of survival data in counting process format (detailed record of each day) data[data$Id == 11,] # extracted one person's record Id Event Fup Start Stop sex Drug1 601 11 0 6 01 0 0 602 11 0 6 12 0 0 603 11 0 6 2

Re: [R] bootstrap in time dependent Cox model?

2012-02-21 Thread Ehsan Karim
/references will be highly appreciated. cheers, Ehsan On Tue, Feb 21, 2012 at 11:11, Ehsan Karim wilds...@hotmail.com wrote: Subject: Re: bootstrap in time dependent Cox model? From: thern...@mayo.edu To: wilds...@hotmail.com CC: r-help@r-project.org Date: Tue, 21 Feb 2012 07:06:16 -0600 Two

[R] bootstrap in time dependent Cox model‏

2012-02-20 Thread Ehsan Karim
Dear R-list, I am wondering how to perform a bootstrap in R for the weighted time dependent Cox model‏ (Andersen–Gill format, with multiple observations from each patients) to obtain the bootstrap standard error of the treatment effect. Below is an example dataset. Would 'censboot' be

[R] coxreg vs coxph: time-dependent treatment

2011-09-11 Thread Ehsan Karim
Dear List, After including cluster() option the coxreg (from eha package) produces results slightly different than that of coxph (from survival) in the following time-dependent treatment effect calculation (example is used just to make the point). Will appreciate any explaination / comment.

Re: [R] coxreg vs coxph: time-dependent treatment

2011-09-11 Thread Ehsan Karim
Sorry: there was an error in the weight calculation, fixed version is the following, but still the final estimates differ as explained in the original email: # require(survival) require(eha) data(heart) head(heart) follow - heart$stop - heart$start fit - glm(transplant

[R] Package Installation in osx

2011-08-22 Thread Ehsan Karim
Dear List: Wondering how to get around the following problem: any suggestions are welcome. Cheers, Ehsan install.packages(geepack)Warning in install.packages(geepack) :  argument 'lib' is missing: using '/home/grad/student/Library/R/2.11/library'--- Please select a CRAN mirror for use in

[R] standard error of exp(coef) from coxph

2011-07-22 Thread Ehsan Karim
Dear List, Must be a silly question, but I was wondering whether there is a direct way of calculating standard error of a HR or exp(coef) from coxph objects x - coxph(Surv(time, status) ~ age + inst, lung) xcoef exp(coef) se(coef) zpage 0.0190 1.02 0.00925 2.06 0.04inst

[R] cluster() or frailty() in coxph

2011-06-26 Thread Ehsan Karim
Dear List, Can anyone please explain the difference between cluster() and frailty() in a coxph? I am a bit puzzled about it. Would appreciate any useful reference or direction. cheers, Ehsan marginal.model - coxph(Surv(time, status) ~ rx + cluster(litter), rats) frailty.model -

[R] Longitudinal data with non-randomized subjects

2011-05-01 Thread Ehsan Karim
Dear List, I have a theoretical question related to epidemiological data analysis: If the treatment status (tx = 0,1) changes over time for the patients in a non-randomized cohort, is there a way to estimate the treatment effect? (i.e., after joining the study, some patients may have to wait

Re: [R] Longitudinal data with non-randomized subjects

2011-05-01 Thread Ehsan Karim
Apology for reposting, but the format of earlier message got distorted; hopefully this time it will be readable: From: wilds...@hotmail.com To: r-help@r-project.org Subject: Longitudinal data with non-randomized subjects Date: Sun, 1 May 2011 00:34:08 -0700 Dear List, I have a theoretical