search for: farnoosh_81

Displaying 20 results from an estimated 24 matches for "farnoosh_81".

2012 Oct 23
3
frequency
Hello, I have a data as follow: ID    Visit xa1 xa2 yb1 yc23 yb33   I want to look at frequency of visit for ID and create a new column as response .  For example my response would be 2 for x and 3 for y. I think I need to write a loop, but I don't know how. I really appreciate your help. Thanks a lot. Best,Farnoosh Sheikhi [[alternative HTML version deleted]]
2013 Apr 13
2
Comparison of Date format
...ataNew1,DataB,by=c("Date.Accident","ID"),type="right") ?res1 #? Date.Accident ID Status #1????? 3-Sep-01? 1????? A #2???? 20-Jan-05? 1?? <NA> #3???? 26-Feb-04? 1????? C #4????? 6-Mar-02? 2????? A A.K. ________________________________ From: farnoosh sheikhi <farnoosh_81 at yahoo.com> To: "smartpink111 at yahoo.com" <smartpink111 at yahoo.com> Sent: Friday, April 12, 2013 5:40 PM Subject: Comparison of Date format ?Hi there, Hope all is well. I have a complicated data and I need to create a new variable based on the date and description...
2012 Oct 08
2
converting DOB format to age
Hi, I have a column of DOB in mm/dd/yyyy. I want to convert this format to age. Thanks a lot.   Best,Farnoosh Sheikhi [[alternative HTML version deleted]]
2012 Oct 15
1
library(rmeta)
Hello, I have a data with following format:      Predictors          n11     n12     n21     n22     Odds.Ratio    log.ratio    se.log.odds. 1 ProcOR respirato     2 ProcVaric vein      3 DiagCardiac anom   4 DiagAllergy        5  DiagOth skin dx    6    DiagGastritis          I want to plot odds ratio by command: forestplot in rmeta library, but I get the following error constantly.  Error in
2012 Nov 06
1
pivot table
Hello, I have a data which looks like below: Some of the patients have multiple diagnosis. ID(200 patients)   Diag (100 unique Diag-200 in general)   Proc (50 uniqe Proc)  DOB (200)   Gender (200)    a                           daig1 b                           diag2 c                            diag1 I want to reformat this data to : ID   diag1 diag 2 diag 3..  diagx   proc1   proc2  
2012 Nov 12
1
reshape
Hi, I have a R output that looks as follow: Rad:0 Rad1:2 Rad3:3 I want to make a new matrix that looks like : sample size is 2400 Variable    n11  n12 Rad            0     2400-0=2400 Rad1          2       2400-2 Rad3  3      2400-3   Thanks a lot for your time and help:) Best,Farnoosh Sheikhi [[alternative HTML version deleted]]
2012 Nov 15
1
Step-wise method for large dimension
Hi , I want to apply the following code fo my data with 400 predictors. I was wondering if there ia an alternative way instead of typing 400 predictors for the following code. I really appreciate your help. fit0<-lm(Y~1, data= mydata) fit.final<- lm(Y~X1+X2+X3+.....+X400, data=mydata) ??? step(fit0, scope=list(lower=fit0, upper=fit.final), data=mydata, direction="forward")
2012 Nov 21
1
update fit (removing insignificant variables)
...??????? -1.9002023? 0.10667909 -17.81232 1.023637e-05 #X4??????????? 1.4421062? 0.09790384? 14.72982 2.606788e-05 #X7??????????? 0.5726324? 0.05396720? 10.61075 1.285606e-04 #X8?????????? -1.9560052? 0.14204298 -13.77052 3.625118e-05 A.K. ________________________________ From: farnoosh sheikhi <farnoosh_81 at yahoo.com> To: arun <smartpink111 at yahoo.com> Sent: Wednesday, November 21, 2012 2:47 PM Subject: update fit (removing insignificant variables) Hi there, I have a question for removing insignificant predictors from fit. The output looks like below but with 170 predictors. Lab_1 ?...
2012 Dec 12
1
Subset of Data
Hi Arun, I have a question about choosing a subset of data. I have a matrix of 5000 in 3500. I want to choose specific variables such as proc1 to proc1000 and Lab1 to Lab1600 and put it into a new matrix to run some correlation analysis. Since I have 3500 variables, I don't know from what column my lab or procedures start. I really appreciate your help. Thanks.   Best,Farnoosh Sheikhi
2013 Jul 24
0
subtracting rows for unique
...ction(x) c(diff(x),NA))),use.names=FALSE) #[1] 126 140 445 224? NA 715? NA #or unlist(lapply(split(dat1,dat1$ID),function(x) c(diff(as.Date(x$Date,format="%d-%b-%y")),NA)),use.names=FALSE) #[1] 126 140 445 224? NA 715? NA A.K. ________________________________ From: farnoosh sheikhi <farnoosh_81 at yahoo.com> To: "smartpink111 at yahoo.com" <smartpink111 at yahoo.com> Sent: Tuesday, July 23, 2013 3:11 PM Subject: subtracting rows for unique Hi there, Hope you are doing well. I have a data set which looks like below, I want to create a new variable (x3-here) which s...
2013 Aug 26
1
Loop for converting character columns to Numeric
...... dat1[,2:3]<- lapply(dat1[,2:3],as.numeric) ?str(dat1) #'data.frame':??? 5 obs. of? 3 variables: # $ V1: chr? "a" "b" "c" "d" ... # $ V2: num? 1 2 10 18 2 # $ V3: num? 6 7 8 9 10 A.K. ________________________________ From: farnoosh sheikhi <farnoosh_81 at yahoo.com> To: "smartpink111 at yahoo.com" <smartpink111 at yahoo.com> Sent: Monday, August 26, 2013 1:48 PM Subject: Loop for converting character columns to Numeric Hi there, I want to change the columns of my data from Character to numeric. Since the number of predic...
2013 Oct 02
0
Removing time and min from Date
...Use ?as.Date() dat1<- read.table(text="V1 2012-01-12 08:23:00 2012-01-19 15:29:00",sep=",",header=TRUE,stringsAsFactors=FALSE) dat1$V1<- as.Date(dat1$V1) ?dat1 #????????? V1 #1 2012-01-12 #2 2012-01-19 A.K. ________________________________ From: farnoosh sheikhi <farnoosh_81 at yahoo.com> To: "smartpink111 at yahoo.com" <smartpink111 at yahoo.com> Sent: Wednesday, October 2, 2013 1:38 AM Subject: Removing time and min from Date Hi Arun, I have a variable including time and date together like below. I want to just keep the date part (2012-01-12 )...
2013 Jan 28
2
Pivot
Hi, I have a data set as follow: X         Z x1        102 x2        102 x2        102 x2        77 x3        23   I need to pivot this data as follows and assign the values based on frequency of column Z: X       Z.102   Z.77 Z.23 x1          1        0        0 x2          21  0 x3         00  1 Thanks. Best,Farnoosh Sheikhi [[alternative HTML version deleted]]
2013 Apr 21
1
Excluding observations
...ID,] ?DataAllExclude #?? ID?????? value #2?? G? 0.23508558 #4?? I -0.38736217 #6?? J -0.24331815 #7?? G -0.32137638 #13? J? 0.57385268 #14? F? 0.59750664 #15? G -0.01775669 #17? F? 0.11683731 #18? H -1.11311883 #20? H? 0.46184261 A.K. ________________________________ From: farnoosh sheikhi <farnoosh_81 at yahoo.com> To: "smartpink111 at yahoo.com" <smartpink111 at yahoo.com> Sent: Sunday, April 21, 2013 2:45 AM Subject: Excluding observations Hi Arun, I have a bit problem excluding some observations from the ID variable in the data. I really appreciate if you can help me....
2017 Jun 30
0
Different date formats in one column
Left as an exercise for the student. -- Sent from my phone. Please excuse my brevity. On June 29, 2017 7:25:36 PM EDT, Farnoosh Sheikhi <farnoosh_81 at yahoo.com> wrote: >Thanks Jeff. This is a nice way of solving this problem. What about the >cases with 0015-02-21?Many thanks.?Best,Farnoosh > > > >On Wednesday, June 28, 2017 10:49 PM, Jeff Newmiller ><jdnewmil at dcn.davis.ca.us> wrote: > > > I doubt yo...
2017 Sep 25
0
Fw: passing different sample sizes
...such homework on your own. Cheers, Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) On Mon, Sep 25, 2017 at 3:28 PM, Farnoosh Sheikhi <farnoosh_81 at yahoo.com> wrote: > Hi Bert, > > Here is the code: > f<-function(n){ > m=runif(n, 50, 100) > d=rnorm(n, 0, 1) > se=sd(d)/sqrt (n) > > ci.u<-mean(d)+1.96*sd(d) > ci.l<-mean(d)-1.96*sd(d) > ci.w<-ci.u-ci.l > > w.ci.uu<-ci.u+(qt (0.975, df=n...
2012 Nov 13
4
for loop
...d res<-data.frame(colSums(dat1)) ?names(res)<-"sum(n11)" ?res #???? sum(n11) #med1??????? 3 #med2??????? 1 #med3??????? 2 #3rd method ?do.call(rbind,lapply(dat1,sum)) #???? [,1] #med1??? 3 #med2??? 1 #med3??? 2 A.K. ________________________________ From: farnoosh sheikhi <farnoosh_81 at yahoo.com> To: arun <smartpink111 at yahoo.com> Sent: Monday, November 12, 2012 7:24 PM Subject: for loop Hi there, I want to calculate the odds ratio for a data like below. ?I want to compute the sum of each column as a new column and variable names as a new column. I have about 10...
2017 Jun 29
1
Different date formats in one column
Thanks Jeff. This is a nice way of solving this problem. What about the cases with 0015-02-21?Many thanks.?Best,Farnoosh On Wednesday, June 28, 2017 10:49 PM, Jeff Newmiller <jdnewmil at dcn.davis.ca.us> wrote: I doubt your actual file looks like the mess that made it to my email software (below) because you posted HTML-format email. Read the Posting Guide, and in particular
2017 Jun 29
0
Different date formats in one column
I doubt your actual file looks like the mess that made it to my email software (below) because you posted HTML-format email. Read the Posting Guide, and in particular figure out how to send plain text email. You might try the "anytime" contributed package, though I suspect it too will choke on your mess. Otherwise, that will pretty much leave only a brute-force series of regular
2012 Sep 28
2
Converting array to matrix
Hi, I have a 3d array as below, I want to make this array to a matrix of p=50(rows) and n=20(columns) with the coverage values . The code before the array is: library(binom) Loading required package: lattice pi.seq<-seq(from = 0.01, to = 0.5, by = 0.01) no.seq<-seq(from = 5, to = 100, by = 5) cp.all = binom.coverage( p = pi.seq, n = no.seq , conf.level = 0.95, method = "exact")