[R] longitudinal study

2013-01-18 Thread bibek sharma
Hello R user, I have a data set from a longitudinal study ( sample below) where subjects are followed over time. Second column (status) contains info about if subject is dead or still in the study and third column is time measured in the week. Here is what I need: if status is not dead or unknown

[R] (no subject)

2012-10-01 Thread bibek sharma
Hello, I am a new R -user and request your help for the following problem. I need to merge two dataset of longitudinal study which has two column (id and respose) common. when I used merge option to join the datas side be side, because of the repeated subject id, I got larger data set which is not

[R] Qustion about Creating a sequence of vector

2012-10-09 Thread bibek sharma
Hello R User, I have a data set where subject( Id) are frequently measured. For example, the size of the data set is 75 by 2 and has following frequency distribution. idfreq 1 30 2 20 3 25 I want to create a variable (say seq) containing sequential count for each id. I mean va

[R] Selecting n observation

2012-10-11 Thread bibek sharma
Hello R help, I have a question similar to what is posted by someone before. my problem is that Instead of last assessment, I want to choose last two. I have a data set with several time assessments for each participant. I want to select the last assessment for each participant. My dataset looks

[R] Test for treatment effect in a logistic regression

2012-10-16 Thread bibek sharma
Dear R usuer, I need to fit logistic regression with binomial response. The objective is to compare treatment groups controlling other categorical and continuous predictors. The GLM procedure with family=binomial(Logit) gives me parameters estimates as well as odd ratios. But objective is to compa

[R] Defining categories

2012-10-24 Thread bibek sharma
Hello R user, Data below represent year in decimal. I would like to catagorize it in such a way that any valye [0,1] goes to catagory 1 , (1,2] goes to catagory 2 and so on.. Any suggestion how it can be done with if else statement or any other way? 2.880556 0.616667 5.08 0.858333 0.47 2.

Re: [R] Defining categories

2012-10-26 Thread bibek sharma
V1 cat1 cat2 > #1 2.88055623 > #2 0.61666711 > #3 5.0856 > #4 0.85833311 > #5 0.4711 > #6 2.93611123 > A.K. > > > > > ----- Original Message - > From: PIKAL Petr > To: arun ; Jorge I Velez ; > b

[R] For loop

2012-11-30 Thread bibek sharma
Hello user, I have large data containing subject id, time and response where subjects are measured repeatedly. However some time are duplicates. I only want data with unique time points per id. I mean if time is repeated, then take only one. Here is a sample data. id timeres 1 2

[R] (no subject)

2012-11-30 Thread bibek sharma
Hello R usuer, The code given below superimposes a pie diagram on another plot containing some points. However, I would like to center the pie diagram on the xy location on the plot, but not on the center. is there any way to re-center pic diagram. Any suggestion or better alternative are highly a

[R] Hello R User

2012-12-14 Thread bibek sharma
Hello R User, In the sample data given below, time is recorded for each id subsequently. For the analysis, for each id, I would like to set 1st recorded time to zero and thereafter find the difference from previous time. I.e. for ID==1, I would like to see Time=0,3,1,3,6. This needs to be implement

[R] Hello R user!

2013-12-17 Thread bibek sharma
Hello R user, I have created two plots (attached!) using the codes below and would like to merge these figures in one. any suggestions are highly appreciated! Thanks, plot(graph1$yod,graph1$xod,data=graph1) dfx = data.frame(ev1=graph1$xod, ev2=graph1$yod, ev3=abs(graph1$dif)) symbols(x=dfx$ev1, y