search for: agec

Displaying 5 results from an estimated 5 matches for "agec".

Did you mean: age
2012 Jul 06
3
Tables extraction in R ?
Hi, I 'm a novice user of R statistics and my hands-on experience with it is minimal. I want to create a table for my MBA course assignment that looks like the ones that SPSS and MS Excel produces ,the data that the table has to include are the following : > table(agec) agec 1 2 3 749 160 32 > x=table(agec) > x agec 1 2 3 749 160 32 > > prop.table(x) agec 1 2 3 0.79596174 0.17003188 0.03400638 > prop.test(749,941) 1-sample proportions test with continuity correction data: 749 out of 941, nu...
2012 Oct 08
1
Survival prediction
...urvival cox-model, which includes a covariate * time interaction. (non-proportionality detected) > I am now wondering how could I most easily get survival predictions from my model. > > My model was specified: > coxph(formula = Surv(event_time_mod, event_indicator_mod) ~ Sex + > ageC + HHcat_alt + Main_Branch + Acute_seizure + TreatmentType_binary + > ICH + IVH_dummy + IVH_dummy:log(event_time_mod) > > And now I was hoping to get a prediction using survfit and providing new.data for the combination of variables > I am doing the predictions: > survfit(cox,...
2011 Jun 01
1
How to write random effect in MCMCglmm
...levels) - yr (num: 2006, 2007, ...) - Male (num: 0=not Male, 1=Male - 2 levels) - Ethnicity (Factor: A, B, H, ..., - 7 levels) - ELL (num: 0, 1, - 2 levels) - Disability (num: 0, 1, - 2levels) - avgTransfers (num with missing values) - sdTransfers (num with missing values) - agec (num with missing values) - PctELL (num) - PctDisability (num) - PctMale (num) Random Effects: - Schoolid, Teacherid, Studentid library(MCMCglmm) y <- MCMCglmm(factor(Level) ~ Type+factor(yr>=2006)+Male+Ethnicity+ELL+ avgTransfers+sdTransfers+agec+Disability+ELL*pctELL+...
2009 Apr 24
3
Help with for/if loop
...ave a set of data that includes various data columns. One if the survival time and another if a continuous variable of ages. I want to put the ages into intervals so that I can then perform the Kalpan Meier test. I am trying to use the following code to build a column with the age group numbers in agecatagory<-c( ) for (i in 1:137) { { if(age[i]<=46) {agecat[i]<-1} if(age[i]>46 & age[i]<= 58) {agecat[i]<-2} if(age[i]>58) {agecat[i]<-3} } agecatagory<-c(agecatagory, agecat[i]) } I have been getting various errors for various things and have finally got it so that...
2003 Jun 06
2
Moran's index
Hi, I am looking for some code for Moran's I. Has anyone previously done this? I have been unable to find it in the search engines. James