[R] [RODBC] ERROR: Could not SQLExecDirect

2014-03-30 Thread nkarthik
When i am running a *DELETE * query on MS SQL database I am getting *[RODBC] ERROR: Could not SQLExecDirect * error. I am getting this error for the DELETE query that requires more time. Please suggest workarounds if any. Thanks -- View this message in context:

[R] continuous time AR - predict/interpolate

2014-03-30 Thread Kehl Dániel
Dear Members, I have a dataset that is similar to the first example in the car function, cts package data(V22174) fit - car(V22174,scale=0.2,order=7, ctrl=car_control(trace=TRUE)) summary(fit) I would like to ask if there is a way to get the predicted/fitted values for all the timepoints

Re: [R] Computing predictive values

2014-03-30 Thread Kehl Dániel
Hi Tom, I think you are going to get better answers if you include some code which helps reproducing what you are doing for other users (posting guide). Exporting regression outputs to Excel does not seem to be the way to go. Aren't you just looking for ?predict. I am sure R can do the job for

[R] metafor combining escalc effect-sizes

2014-03-30 Thread Purssell, Ed
Dear All I have a question about combining effect sizes generated by escalc in metafor. I realise these may be stupid things to do; but they are deliberately so to explain what I mean - I don't intend doing this! I have 3 studies; each of which has a different measure of effect/presents the

[R] Error in match.names(clabs, names(xi)) : names do not match previous names

2014-03-30 Thread Bill
Hi. I am running the code below. I am getting the error Error in match.names(clabs, names(xi)) : names do not match previous names I don't really want to specify the size of the allFuku data frame at the beginning but even when I tried it I still got this error. v12=paste(0,1:9,-,2010,,sep=)

Re: [R] problem of tapply function

2014-03-30 Thread Massimiliano Tripoli
Thanks Bert - Messaggio originale - Da: Bert Gunter gunter.ber...@gene.com A: Massimiliano Tripoli mtrip...@istat.it Cc: r-help@r-project.org Inviato: Sabato, 29 marzo 2014 15:52:59 Oggetto: Re: [R] problem of tapply function The argument to tapply is FUN, not fun. R is case sensitive.

Re: [R] Error in match.names(clabs, names(xi)) : names do not match previous names

2014-03-30 Thread Bill
Not sure why but when I change this: temp.df[,month]-month temp.df[,year]-year to this: temp.df[,2]-month temp.df[,1]-year it seems to work. On Sun, Mar 30, 2014 at 6:01 PM, Bill william...@gmail.com wrote: temp.df[,month]-month temp.df[,year]-year [[alternative HTML version

[R] unlist( list( factor( 'a'), 1)) == c( 1, 1); unlist( list( factor( 'a'), factor( 1)))==c( 'a', '1')

2014-03-30 Thread Frank Schwidom
Hi, c( factor( 'a'), ( 1)) [1] 1 1 c( factor( 'a'), factor( 1)) [1] 1 1 c( factor( 'a'), factor( 'b')) [1] 1 1 unlist( list( factor( 'a'), 1)) [1] 1 1 unlist( list( factor( 'a'), factor( 1))) [1] a 1 Levels: a 1 unlist( list( factor( 'a'), factor( 'b'))) [1] a b Levels: a b In an

Re: [R] metafor combining escalc effect-sizes

2014-03-30 Thread Michael Dewey
At 09:42 30/03/2014, Purssell, Ed wrote: Dear All I have a question about combining effect sizes generated by escalc in metafor. I realise these may be stupid things to do; but they are deliberately so to explain what I mean - I don't intend doing this! I have 3 studies; each of which

Re: [R] unlist( list( factor( 'a'), 1)) == c( 1, 1); unlist( list( factor( 'a'), factor( 1)))==c( 'a', '1')

2014-03-30 Thread Jeff Newmiller
This is definitely not an error, all these behaviours are by design. You need to (re)read the description of factors in the Introduction to R document that comes with the software. Factors are not optimized versions of strings, they are finite sets of category information designed for use in

Re: [R] Error in match.names(clabs, names(xi)) : names do not match previous names

2014-03-30 Thread Bert Gunter
Please read ?[ carefully -- or (re?)-read An Introduction to R. The column name must be quoted: temp.df[,month]-month -- Bert Bert Gunter Genentech Nonclinical Biostatistics (650) 467-7374 Data is not information. Information is not knowledge. And knowledge is certainly not wisdom. H.

Re: [R] Computing predictive values

2014-03-30 Thread steve tom
Here is my current process: x.sub- subset(Model.Update, Row 200 Row 0) # INITIAL SAMPLE x.sub1-subset(Model.Update, Row 206 Row 200) # Subset into lots of 5 until current period - 5 period ...

[R] about lm()

2014-03-30 Thread Si Qi L.
Hi I have a problem with linear regression. This is my codes: acc1- lm(data$acc ~ dummy + data$Reqloanamount + data$Code + data$Code.1 + data$EmpNetMonthlyPay + data$Customer_Age + data$RTI) summary(acc1) These attributes are all numerical except the acc(factors), so how can I fix the problem R

Re: [R] about lm()

2014-03-30 Thread Frank Schwidom
Please provide some data from your variable data. Show the output of dput( data) or an subset of data which leads toe the specific error. Regards On Sun, Mar 30, 2014 at 02:23:09PM +0100, Si Qi L. wrote: Hi I have a problem with linear regression. This is my codes: acc1- lm(data$acc ~

Re: [R] about lm()

2014-03-30 Thread Bert Gunter
1. Post in plain text, not HTML. 2. Read ?lm and note the data argument. Use it in your lm call instead of all the $data extractions. 3. Your problem is with the summary() call, so read ?summary.lm. Learn about S3 methods if you do not know where the .lm part is coming from by reading the

Re: [R] about lm()

2014-03-30 Thread Ted Harding
I suspect the problem may be with the structure of the data. Si Qi L wrote: [...] acc1- lm(data$acc ~ dummy + data$Reqloanamount + data$Code + data$Code.1 + data$EmpNetMonthlyPay + data$Customer_Age + data$RTI) [...] These attributes are all numerical except the acc(factors) [...]

Re: [R] about lm()

2014-03-30 Thread Bert Gunter
Ted: Yes. You're probably right, and I'm probably wrong. I did not read carefully enough. Impossible to know for sure with such an ill-posed query, though. Cheers, Bert Bert Gunter Genentech Nonclinical Biostatistics (650) 467-7374 Data is not information. Information is not knowledge. And

[R] regsubsets

2014-03-30 Thread Mohammad Ahmed
I am not able to find the criterion under which the best subset model for a certain size is chosen for the function regsubsets (leaps package in R) . For leaps function, we can determine the method ( cp,r2 or adj r2). For example, x - predictors y - response g - regsubsets(x,y,nvmax=1,nbest=1)

Re: [R] Please help

2014-03-30 Thread arun
Hi Atem, Try this: I created 3 folders (Precip, Tmax, Tmin) within the folder sample #working directory: sample list.files() #[1] Imputation_Daily_Sim01.datImputation_Daily_Sim02.dat #[3] Imputation_Daily_Sim03.datPrecip #[5] Sim1971-2000_Daily_Sim001.dat

Re: [R] regsubsets

2014-03-30 Thread Bert Gunter
Mohammed: I am sorry to burst your bubble, but the whole concept of finding a best subset regression is now considered to be badly flawed. There will typically be many essentially equivalent choices. Shrinkage of varying kinds and ensemble fits are the sorts of things that are done nowadays. I

[R] cov.wt gives different results from other (co)variance functions (cov, wtd.var)

2014-03-30 Thread Emilio Torres Manzanera
Dear Sir, I am not sure about the precision of the cov.wt function. It seems that it provides different results when using frequency weights. This discrepancy only occurs with the covariance matrix, not with the correlation matrix. Do you know to how to solve this issue? Thank you Best regards,