similar to: Re : Seperate timestamp data into date and time

Displaying 20 results from an estimated 4000 matches similar to: "Re : Seperate timestamp data into date and time"

2004 Dec 14
2
Re : Save result in a For Loop
Hiya, I have been struggling to save the result from the FOR loop. What is the best way to do it, as I need the result to merge with another dataset for further analysis ? for (dd in ((M-10):M)){ + dist<-(32-dd) + r<-1/2*(1-exp(-2*dist/100)) + map<-c(dd,round(r,4)) + print(map) + next + } Thanks. Stella ___________________________________________________________________________ This
2010 Oct 12
1
Help with function writing
Hello all I have what seems like a simple question but have not been able to find an answer on the forum. I'm trying to define a function which involves regression models and a large number of covariates. I would like the function to accept any number of covariates and, ideally, I would like to be able to enter the covariates in a group (e.g. as a list) rather than individually. Is there any
2003 Jan 21
1
Logistic regression: At times correlation matrix of coefficients gets messed up
Hi, When I include a categorical variable (RACE with 3 levels - "white", "black" and "other") in my logistic regression model, the correlation matrix of the coefficients gets messed up. I get something like: ----------------------------------------- Correlation of Coefficients: ( A L RACEb AGE , 1 LWT , 1 RACEblack 1
2009 Apr 26
1
Stochastic Gradient Ascent for logistic regression
Hi. guys, I am trying to write my own Stochastic Gradient Ascent for logistic regression in R. But it seems that I am having convergence problem. Am I doing anything wrong, or just the data is off? Here is my code in R - lbw <- read.table("http://www.biostat.jhsph.edu/~ririzarr/Teaching/754/lbw.dat" , header=TRUE) attach(lbw) lbw[1:2,] low age lwt race smoke ptl ht ui ftv
2004 Nov 21
3
RE : Create sequence for dataset
Dear members, I want to create a sequence of numbers for the multiple records of individual animal in my dataset. The SAS code below will do the trick, but I want to learn to do it in R. Can anyone help ? data ht&ssn; set ht&ssn; by anml_key; if first.anml_key then do; seq_ht_rslt=0; end; seq_ht_rslt+1; Thanks in advance. Stella
2009 Oct 23
2
Inserting rows
Hi all, I have the data set df with three varaibles, x1 x2 x3 1 2 5 2 4 1 5 6 0 1 1 2 I want to insert more rows ( eg, 3 rows with value filled with zeros) 1 2 5 2 4 1 5 6 6 1 1 2 0 0 0 0 0 0 0 0 0 Can any body help me out? Thanks
2004 Dec 06
2
Re : LOOPS
Dear lists, I want to construct a loop in R, but don't know how to do it. I can do it in SAS, but I prefer in R (which I am hoping I will off SAS for good soon). Could anyone help me to convert the SAS codes to equivalent R codes. Basically, the following codes were written to establish the sire gametes or phases for daughter design for one markers two alleles. Here are the SAS code: do
2004 Mar 11
2
kenrel 2.6.4 patch for fixing warning of smbfs on high gid/uid
Hello, when i compiled latest linux 2.6.4 kernel source with gcc 3.3.2 on Linux/x86, i got a few warnings about varaibles beeing compared against constants where the range of the variable is so that the expression is always constant. The explicit comparison has to do with the code for high-uid and gid sheme. attached you will find a diff which does eliminate this error message by introducing an
2002 May 03
3
skipping columns with read.fwf?
I have a file in fwf. It is rather large, about 40,000 rows and 40 variables (columns). I only need about 10 variables form the data set for the analysis at hand. Unfortunately, these 10 variables are not contiguous in the file, for example, the first is position 1-8, the next position 25-27, then 40. Is there a way to read the selected varaibles that I need without reading in the entire data
2009 Mar 23
3
Replacing a few variable values within a DataFrame...
I would like to replace a few varaibles within a data frame. For example, in the dataframe below (contrived) I would like to replace the current housesize value only if the Location is HSV. However, I would like to leave the other values intact. I tried "ifelse", but I don't really need the else condition. test_data2_df<-data.frame(Variables=c("SQR
2006 Aug 03
1
how to use the EV AND condEV from BMA's results?
Dear friends, In R, the help of "bic.glm" tells the difference between postmean(the posterior mean of each coefficient from model averaging) and condpostmean(the posterior mean of each coefficient conditional on the variable being included in the model), But it's still unclear about the results explanations, and the artile of Rnews in 2005 on BMA still don't give more detail on
2009 Aug 31
1
Probit function
Hello, I want to start testing using the MNP probit function in stead of the lrm function in my current experiment. I have one dependant label and two independent varaibles. The lrm is simple model <- lrm(label ~ val1 + val2) I tried the same thing with the mnp function and got an error that I don't understand model <- mnp(label ~ val1 + val2) I get back an immediate error that
2011 Jun 13
0
How to formulate an (effect-modifying) interaction with matching variable in a conditional logistic regression?
Hi, I would like to see if a matching variable is an effect-modifier in a conditional logistic regression. Naturally, the matching variable can't enter directly in the model but as an interaction with terms that are in. However, I have problems in formulating the correct model the term that's already in the model is a factor. I am using treatment contrasts and the problem is that if I
2009 Nov 30
1
Using stepAIC to produce a p-value for when a particular variable was taken out of the model
Dear all, I have decided after much deliberation to use backward elimination and forward selection to produce a multivariate model. Having read about the problems with choosing selection values I have chosen to base my decisions of inclusion and exclusion on the AIC and am consequently using the stepAIC function. This post however does not relate to whether or not this is the correct decision!
2009 Jan 18
4
data management
Dear Rxperts, I have a varaibles data file that looks like this p(1) 10 p(1) 3 p(1) 4 p(2) 20 p(2) 30 p(2) 40 p(3) 4 p(3) 1 p(1) 2 I cannot process these data with R because it does not like the parentheses. How can I get these to look like: p1 10 p1 3 p1 4 p2 20 p2 30 p2 40 p3 4 p3 1 p3 2 The data is in a tab delimited text file and I want to get it into a data.frame(). Many thanks in
2005 Jan 04
4
Re : Frequency count
Dear list, I have a dataset as follow and I would like to count the frequencies for the combination of the two variables (f1 and f2) for each id. I know it is should be straight forward, but I just don't know how to do it in R. Here is the SAS code I will use to get the output I want : proc means nway; class id f1 f2; var flag output out=temp; Dataset: id f1 f2 flag 798 1 2
2003 Jul 15
1
Tree question
I was under the impression that the tree method (e.g. as implemented in rpart) was insensitive to monotonic transformations of the dependent variable. e.g. Breiman Olshen et al. Classification and Regression Trees state "In a standard data structure [a tree] is invariant under all monotone transformations of individual ordered varaibles" (p. 57) However, I get very different results
1999 Jan 07
2
errores
Happy New Year to all, I am using RW0631 and WIN98. 1. The command DATA only works for the base library. 2. The following code on page 312 of Venables and Ripley 1997 sitka.lme <- lme(size~treat*ordered(Time),random=~1,cluster=~tree,data=Sitka, serial.structure="ar1.continuous",serial.covariate=~Time) produced the following error message Error in lme(size ~ treat *
2012 Aug 09
1
basehaz() in package survival and warnings with coxph
I've never seen this, and have no idea how to reproduce it. For resloution you are going to have to give me a working example of the failure. Also, per the posting guide, what is your sessionInfo()? Terry Therneau On 08/09/2012 04:11 AM, r-help-request at r-project.org wrote: > I have a couple of questions with regards to fitting a coxph model to a data > set in R: > > I have a
2008 Mar 10
1
ML Estimation Differences with R and SAS
List, I'm working on fitting a logistic model for a well known dataset (which is given below in case anyone wants to try to reproduce). I used both R and SAS to fit the model and have some differences in the parameter estimates. I'm wondering if R calculates the ML estimates differently. I'm making NO accusations as to which program is "right or wrong". That is not the