similar to: how to get design matrix?

Displaying 10 results from an estimated 10 matches similar to: "how to get design matrix?"

2009 May 10
2
plot(survfit(fitCox)) graph shows one line - should show two
R 2.8.1 Windows XP I am trying to plot the results of a coxph using plot(survfit()). The plot should, I believe, show two lines one for survival in each of two treatment (Drug) groups, however my plot shows only one line. What am I doing wrong? My code is reproduced below, my figure is attached to this EMail message. John > #Create simple survival object >
2009 May 11
1
Warning trying to plot -log(log(survival))
windows xp R 2.8.1 I am trying to plot the -log(log(survival)) to visually test the proportional hazards assumption of a Cox regression. The plot, which should give two lines (one for each treatment) gives only one line and a warning message. I would appreciate help getting two lines, and an explanation of the warning message. My problem may the that I have very few events in one of my strata,
2006 Apr 25
4
Help needed
Hi, I am trying to change a SAS macro to R. here is my code. I get an error at the last line. attach(fram) dset1<-cbind(AGE,BMI,DEATH) > BMIGRP<-cut(BMI,breaks=3,right=TRUE) > AGEGRP<-floor(AGE/10)-2 > dset<-cbind(AGEGRP,BMIGRP,DEATH) > maxage<-max(dset[,1]) > minage<-min(dset[,1]) > #maxcls<-dset[,2] > #mincls<-dset[,2] >
2012 Jun 28
1
the meaning of subscripts
Hi, Now i am dealing with longitudinal data set and I want to see the rough marginal plot for 2 variables separately. I found the code from one example here, reading <- read.table("http://www.ats.ucla.edu/stat/R/examples/alda/data/reading_pp.txt", header=T, sep=",") reading[reading$id %in% c(4, 27, 31, 33, 41, 49, 69, 77, 87), ] xyplot(piat~age | id ,
2009 Oct 23
1
making a plot in xyplot
Hello, I am a newbie to the lattice package in R, and I'm trying to make a plot using the xyplot function. I have repeated measures data (2 conditions) for two different groups of subjects (teens and adults). So far, I've made a basic graph using xyplot(y ~x, group=subnum, data=mydata, type="b"). Now I would like to make all the teens' lines one color and the adults'
2018 May 30
2
Filtering using multiple rows in dplyr
Hi Folks, I have just started using dplyr and could use some help getting unstuck. It could well be that dplyr is not the package to be using, but let me just pose the question and seek your advice. Here is my basic data frame. head(h) subject ageGrp ear hearingGrp sex freq L2 Ldp Phidp NF SNR 1 HALAF032 A L A F 2 0 -23.54459 55.56005 -43.08282
2006 Apr 17
7
help
Hi, I am trying to runn a age-period-cohort model, but here is what I am having problem with, hope you can help me! This is what I am trying to do: sumzero_a<-((A-min(A))/5+1) - mean((A-min(A))/5+1) where A is my age variable (numeric, the mid-point of a five-year age group), but I got the following error: Error in min(..., na.rm = na.rm) : invalid 'mode' of argument I am pretty
2011 May 12
3
Survival Rate Estimates
Dear List, Is there an automated way to use the survival package to generate survival rate estimates and their standard errors? To be clear, *not *the survivorship estimates (which are cumulative), but the survival *rate * estimates... Thank you in advance for any help. Best, Brian [[alternative HTML version deleted]]
2006 Mar 25
3
dot diagram
Hello, I hope to plot my data in a dot diagram, something like the output of the last example of layout function in graphics package. The only difference is that I need the rectangle in histogram is replaced by dot. Thanks in advance. Best wishes, Jinsong Zhao
2013 Aug 01
3
Problemas con NA y sub-selección por índice
Estimados compañeros de lista, estábamos trabajando con unos datos que adjunto y queríamos hacer una selección mediante índices pero nos deparamos con algún problema. Por ejemplo si hacemos solamente: data[data$PESO==76] me da algo como: > str(data[data$PESO==76,]) 'data.frame': 2475 obs. of 10 variables: $ PUREZA_A: Factor w/ 1 level "pi": 1 NA NA NA NA NA NA NA