You need to go study SQLServer database administration for awhile...
and this is not the place for that. (A book is advisable.) You will also need
to set up an ODBC Data Source Name for open connectivity to that database.
You should also start learning how to use RODBC to send SQL statem
And we have little idea what the format of a ".mdf" file is. (It has
multiple meanings, see e.g. http://www.delphifaq.com/faq/f777.shtml.)
Since you mention 'with SQL', maybe you meant 'Microsoft SQL Server',
some (older?) versions of which have '.mdf' files. The short answer
in that case is
Maybe this is what you're looking for:
# x is your set of explanatory variables (10 of them):
x <- array(rnorm(1), dim=c(1000,10))
# y is your dependent variable:
y <- rbinom(1000, 1, 0.3)
# run the regression on each column of x:
reg <- apply(x, 2, function(z) glm(y ~ z, family=binomial(lin
Again, thanks so much for your help.
Is there a "for dummies" version for interpreting the le Cessie and
Houwelingen test. I read the 1991 biometrics paper but honestly got lost in
the math.
Is it interpreted the same way the Hosmer-Lemeshow test is? ie, a
non-significant result means model fit
Jeff,
Clearly you (and others) have put a lot of work into xts -- and I'm the
beneficiary. So I'll stop complaining.
Thanks for the class (both code and explanation).
*-- Russ *
On Sun, May 8, 2011 at 8:23 PM, Jeff Ryan wrote:
> Hi Russ,
>
> We're of course getting into some incredibly fine
On Mon, May 9, 2011 at 2:20 AM, Thomas Lumley wrote:
> On Mon, May 9, 2011 at 6:35 AM, Deepayan Sarkar
> wrote:
>> On Sat, May 7, 2011 at 1:55 AM, Raphael Mazor wrote:
>>> Is it possible to create weighted boxplots or violin plots in lattice?
>>>
>>> It seems that you can specify weights for pan
Thank you all for your input.
Unfortunately my problem is not yet resolved. Before I respond to
individual comments I make a clarification:
In Stata, using the same likelihood function as above, I can reproduce
EXACTLY (to 3 decimal places or more, which is exactly considering I
am using differe
Hi Russ,
We're of course getting into some incredibly fine-level detail on how all of
this works. I'll try and explain issues as I recall them over the
development of xts and cbind.xts
xts started as an extension of zoo. zoo is an extension of 'ts' (greatly
simplified comparison of course, but
On Sun, May 8, 2011 at 1:17 PM, Russ Abbott wrote:
> I understand Josh's example:
>
> mat <- matrix(1:10, dimnames = list(NULL, "A"))
> cbind(X = 11:20, Y = mat + 1)
> cbind(X = 11:20, Y = mat[, "A"] + 1)
>
> In the line, cbind(X = 11:20, Y = mat + 1), it would be nice if an error or
> warning mes
Hi,
I have a very large ".mdf" database (36 GB) that I want to import to R.
I'm using a computer with 64 GB of RAM, running on windows server 2008 R2
with SQL.
Could anyone guide me through the process. I have absolutely no idea what to
do.
Thanks,
Mauricio Romero
Russ,
On May 8, 2011 6:29 PM, "Russ Abbott" wrote:
>
> Hi Jeff,
>
> The xts class has some very nice features, and you have done a valuable
> service in developing it.
>
> My primary frustration is how difficult it seems to be to find out what went
> wrong when my code doesn't work. I've been wr
There is a good tutorial here:
http://www.statsoft.com/textbook/discriminant-function-analysis/
I doubt your question is appropriate for this list ... good luck!
David Cross
d.cr...@tcu.edu
www.davidcross.us
On May 8, 2011, at 7:28 PM, Sylvia Rocha wrote:
> I am a student of ecology from B
I am a student of ecology from Brazil and I need a tutorial on discriminant
analysis, can someone help me?
sylvia
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do
Yes that's how it works, but a single run does not provide sufficient
precision unless your sample size is enormous. When you partition into
tenths again the partitions will be different so yes there is some
randomness. Averaging over 100 times averages out the randomness. Or just
use the bootst
Please read the documentation carefully, and replace the Design package with
the newer rms package.
The older Hosmer-Lemeshow test requires binning and has lower power. It
also does not penalize for overfitting. The newer goodness of fit test in
rms/Design should not agree with Hosmer-Lemeshow.
So in my first try before I got your message, this is what I did:
orconf<-list()
ccoef<-list()
or<-list()
coef<-list()
out<-list()
for (i in 1:49){
out[[i]]<-glm(y~var[[i]],family=binomial(link="logit"))
coef[[i]]<-out[[i]]$coef[2]
or[[i]]<-exp(out[[i]]$coef[2])
bond<-matrix(out[[i]]$coef[2
I am sorry,Andrew,I don't get you.
Please forgive my poor English.
--
View this message in context:
http://r.789695.n4.nabble.com/nls-problem-with-R-tp3494454p3508131.html
Sent from the R help mailing list archive at Nabble.com.
__
R-help@r-project.org
Thanks Mike.
Your suggestion is really helpful.I did with the your instruction , it
really works out.
What's more,can you use this package
http://cran.r-project.org/web/packages/minpack.lm/index.html
it use Levenberg-Marquardt algorithm.
Can this package do with four parameters?
Thanks again
--
Vi
I'm trying to do a Hosmer-Lemeshow 'goodness of fit' test on my logistic
regression model.
I found some code here:
http://sas-and-r.blogspot.com/2010/09/example-87-hosmer-and-lemeshow-goodness.html
The R code is above is a little complicated for me but I'm having trouble
with my answer:
Hosmer-
Thanks so much for the reply it was exceptionally helpful! A couple of
questions:
1. I was under the impression that k-fold with B=10 would train on 9/10,
validate on 1/10, and repeat 10 times for each different 1/10th. Is this
how the procedure works in R?
2. Is the reason you recommend repea
formatC(round(2189.745, 2), big.mark=",",format="f", drop0trailing = TRUE)
On Sun, May 8, 2011 at 9:02 PM, Worik R wrote:
>> formatC(round(2189.745, 2), big.mark=",",format="f")
> [1] "2,189.7400"
>
> Unfortunately this does not work
>
> Worik
>
> On Mon, May 9, 2011 at 11:45 AM, Peter Langfelder
On Mon, May 9, 2011 at 12:06 PM, David Winsemius wrote:
>
> On May 8, 2011, at 8:02 PM, Worik R wrote:
>
> formatC(round(2189.745, 2), big.mark=",",format="f")
>>>
>> [1] "2,189.7400"
>>
>> Unfortunately this does not work
>>
>
> Because you did not follow his example.
>
That is true. I did not
On May 8, 2011, at 8:02 PM, Worik R wrote:
formatC(round(2189.745, 2), big.mark=",",format="f")
[1] "2,189.7400"
Unfortunately this does not work
Because you did not follow his example.
--
David.
Worik
On Mon, May 9, 2011 at 11:45 AM, Peter Langfelder <
peter.langfel...@gmail.com> wrote:
> formatC(round(2189.745, 2), big.mark=",",format="f")
[1] "2,189.7400"
Unfortunately this does not work
Worik
On Mon, May 9, 2011 at 11:45 AM, Peter Langfelder <
peter.langfel...@gmail.com> wrote:
> On Sun, May 8, 2011 at 4:41 PM, Worik R wrote:
> > Friends
> >
> > I am trying to format a num
On Sun, May 8, 2011 at 4:41 PM, Worik R wrote:
> Friends
>
> I am trying to format a number to a string so 2189.745 goes to "2,189.35"
> and 309283.929 goes to "309,283.93"
>
> I have tried to use formatC(X, big.mark=",",drop0trailing=FALSE, format="f")
> but it does not get the number of decimals
Friends
I am trying to format a number to a string so 2189.745 goes to "2,189.35"
and 309283.929 goes to "309,283.93"
I have tried to use formatC(X, big.mark=",",drop0trailing=FALSE, format="f")
but it does not get the number of decimals correct. Specifying digits does
not work as that is signif
Not knowing what format your data is in or what model you are using...
df # is your data frame with columns the variables you are running regressions
for
datout <- data.frame(coeff = NA, conf_low = NA, conf_high = NA, odd = NA) # a
table to put your results in
for(i in 1:length(names(df)[2:10]))
Dear all,
We have developed our own Affymetrix chip (Custom Express Array, PM-only
with two species).
I want to analyse the data with the limma package, but for that I need to
built my own CDF package,
probe package and built the filters to analyse one specie or another.
I'm using the makeProbePac
Hi Jeff,
The xts class has some very nice features, and you have done a valuable
service in developing it.
My primary frustration is how difficult it seems to be to find out what went
wrong when my code doesn't work. I've been writing quite sophisticated code
for a fairly long time. It's not tha
Hello everyone,
Below is a metadata summary of raw data in a data frame (which itself is a
data frame). I want to add 2 columns to the data frame below that will
contain the min and max for integer and numeric class columns and NA for
factors and character vectors. Can anyone suggestion the most s
On 05/08/2011 02:15 PM, Helga Garcia wrote:
Dear all,
We have developed our own Affymetrix chip (Custom Express Array, PM-only
with two species).
I want to analyse the data with the limma package, but for that I need to
built my own CDF package,
probe package and built the filters to analyse one
One way to get the ratings would be to use the ave() function:
rating = ave(x$freq,x$track,
FUN=function(x)cut(x,quantile(x,(0:5)/5),include.lowest=TRUE))
- Phil Spector
Statistical Computing Facility
boki2b wrote:
>
> Hello,Could somebody tell me what is the difference between theese 3
> calls of functionsarma(x,order=c(1,0)), arima(x,order=c(1,0,0))
> ar(x,order=1)?I expected same residuals of theese three models,but
> unexpectably for the first two R requiredinitial value of something
> (w
The plot works fine for me with the example data you have given. Maybe
it is something in your par settings. Try putting a ylim in your plot
the same as you have done for the xlim:
y1<-min(original.estimate)
y2<-max(original.estimate)
plot(lfdr.true, original.estimate, pch=19, col = "dark red",xli
try this:
> # create some data
> x <- data.frame(userid = paste('u', rep(1:20, each = 20), sep = '')
+ , track = rep(1:20, 20)
+ , freq = floor(runif(400, 10, 200))
+ , stringsAsFactors = FALSE
+ )
> # get the quantiles for each track
> tq <-
Hi Russ,
Colnames don't get rewritten if they already exist. The reason is due to
performance and how cbind is written at the R level.
It isn't perfect per se, but the complexity and variety of dispatch that can
take place for cbind in R, as it isn't a generic, is quite challenging to get
to
Hello,Could somebody tell me what is the difference between theese 3 calls of
functionsarma(x,order=c(1,0)), arima(x,order=c(1,0,0)) ar(x,order=1)?I expected
same residuals of theese three models,but unexpectably for the first two R
requiredinitial value of something (what?)...Thanks in advance
Dear All,
I am trying to plot some element of the below lists which contains 10,000
rows. For instance lfdr_true on x-axis vs hi and and I also include
estimates as points on the plot.
However, as you can notice the real difference comes in the later decimal
places and not in the first 2 to 3 de
Dear all,
We have developed our own Affymetrix chip (Custom Express Array, PM-only
with two species).
I want to analyse the data with the limma package, but for that I need to
built my own CDF package,
probe package and built the filters to analyse one specie or another.
I'm using the makeProbePac
On Mon, May 9, 2011 at 6:35 AM, Deepayan Sarkar
wrote:
> On Sat, May 7, 2011 at 1:55 AM, Raphael Mazor wrote:
>> Is it possible to create weighted boxplots or violin plots in lattice?
>>
>> It seems that you can specify weights for panel.histogram() and
>> panel.densityplot(), but not for panel.b
On Sun, May 8, 2011 at 6:36 PM, Carrie Li wrote:
> Dear R-helpers,
>
> I am using the package "gee" to run a marginal model.
>
> Here is the output.
> In my simulated data, both x and z are time-varying, so I include their
> interaction terms with time indicator (i.e. tind=0, if time 1, and 1 if t
I understand Josh's example:
mat <- matrix(1:10, dimnames = list(NULL, "A"))
cbind(X = 11:20, Y = mat + 1)
cbind(X = 11:20, Y = mat[, "A"] + 1)
In the line, cbind(X = 11:20, Y = mat + 1), it would be nice if an error or
warning message were issued to the effect that the "Y = " part is ignored or
Hi Russ,
On Sun, May 8, 2011 at 12:07 PM, Russ Abbott wrote:
> I'm having troubles with the names of columns.
>
> quantmod deal with stock quotes. I've created an array of the first 5
> closing prices from Jan 2007. (Is there a problem that the name is the same
> as the variable name? There shou
On May 8, 2011, at 3:07 PM, Russ Abbott wrote:
I'm having troubles with the names of columns.
quantmod deal with stock quotes. I've created an array of the first 5
closing prices from Jan 2007. (Is there a problem that the name is
the same
as the variable name? There shouldn't be.)
close
I'm having troubles with the names of columns.
quantmod deal with stock quotes. I've created an array of the first 5
closing prices from Jan 2007. (Is there a problem that the name is the same
as the variable name? There shouldn't be.)
> close
close
2007-01-03 1416.60
2007-01-04
Hi,
I have a mysql table with fields userid,track,frequency e.g
u1,1,10
u1,2,100
u1,3,110
u1,4,200
u1,5,120
u1,6,130
.
u2,1,23
.
.
where "frequency" is the number of times a music track is played by a
"userid"
I need to turn my 'frequency' table into a rating table (it's for a
recommender system)
I have never made a loop on my own to do anything in R. But I am hoping
someone can help me build one for the following issue:
I need to make a univariate logistic regression for each of my variables
(about 62 of them), then I need to gather up each of their coefficients (not
the intercepts), eac
I tried to update my packages using update.packages()
I got the following message:
The downloaded packages are in
‘/tmp/RtmpyDYdTX/downloaded_packages’
Warning in install.packages(update[instlib == l, "Package"], l, contriburl =
contriburl, :
'lib = "/usr/lib/R/library"' is not writab
On Fri, May 6, 2011 at 10:21 PM, Dat Mai wrote:
> Hello all,
>
> I'm trying to create a heatmap using 2 matrices I have: z and v. Both
> matrices represent different correlations for the same independent
> variables. The problem I have is that I wish to have the values from matrix
> z to be repre
On Fri, May 6, 2011 at 9:24 PM, Elliot Joel Bernstein
wrote:
> I'm trying to create an xyplot with a "groups" argument where the y-variable
> is the cumsum of the values stored in the input data frame. I almost have
> it, but I can't get it to automatically adjust the y-axis scale. How do I
> get
On Sat, May 7, 2011 at 1:55 AM, Raphael Mazor wrote:
> Is it possible to create weighted boxplots or violin plots in lattice?
>
> It seems that you can specify weights for panel.histogram() and
> panel.densityplot(), but not for panel.bwplot or panel.violin().
Not for panel.histogram() either.
I
The option `iter.max' should be an element of the Control list. If you read
the help file carefully, you would have noticed this. So, try this:
f <- bj(Surv(ftime, stroke) ~ rcs(age,5) + hospital, link='identity',
control=list(iter.max=200), x=TRUE, y=TRUE)
Identity link is challenging to fit
On 08.05.2011 17:10, André Júng wrote:
Dear all,
I'm trying to rearrange variables in a table in a custum order for using it
with levelplot. So far I could only find examples showing how to sort
alphabetically. Here is a short example:
a<- c("Anna","Anna","Michael","Klaus","Klaus","Anna","F
On 11-05-08 11:10 AM, André Júng wrote:
Dear all,
I'm trying to rearrange variables in a table in a custum order for using it
with levelplot. So far I could only find examples showing how to sort
alphabetically. Here is a short example:
a<- c("Anna","Anna","Michael","Klaus","Klaus","Anna","Fr
> From: pda...@gmail.com
> Date: Sun, 8 May 2011 09:33:23 +0200
> To: rh...@sticksoftware.com
> CC: r-help@r-project.org
> Subject: Re: [R] Confidence intervals and polynomial fits
>
>
> On May 7, 2011, at 16:15 , Ben Haller wrote:
>
> > On May 6, 2011, at 4:27 PM, David Winsemius wrote:
> >
>
Hello,
I would like to increase the number of iterations for running a
Buckley-James regression model in the rms package, but something is
apparently syntactically wrong. The following code initially is
exactly as it appears in the help page (which runs successfully), then
a "failure to converge"
Dear all,
I'm trying to rearrange variables in a table in a custum order for using it
with levelplot. So far I could only find examples showing how to sort
alphabetically. Here is a short example:
a <- c("Anna","Anna","Michael","Klaus","Klaus","Anna","Fritz")
b <-
c("Schnitzel","Pommes","Po
Le 07/05/2011 06:17, Penny Bilton a écrit :
I am trying to find a confidence band for a fitted non-linear curve. I
see that the predict.nls function has an interval argument, but a
previous post indicates that this argument has not been implemented.
Is this still true? I have tried various way
On Sat, May 7, 2011 at 12:17 AM, Penny Bilton wrote:
> I am trying to find a confidence band for a fitted non-linear curve. I see
> that the predict.nls function has an interval argument, but a previous post
> indicates that this argument has not been implemented. Is this still true?
> I have tri
Much quicker than asking for help on the list is to read the help file
(which you have been asked to do in the posting guide you hopefully read).
?predict.nls tells us:
"interval A character string indicating if prediction intervals or a
confidence interval on the mean responses are to be cal
Please specify the package(s) you are using. In this case it should be rms.
val.surv is mainly for an out-of-sample validation, as it does not penalize
for overfitting. calibrate.cph is probably what you should be using.
To use val.surv in the fashion you are trying to use it, specify y=TRUE,
s
I see you already have three solutions but, just for the heck of it, here's
another. I am trying to get familiar with the reshape2 package and your
question was a good exercise for me.
With your data set named xx:
library(reshape2)
yy <- melt(xx, id=c("period", "treatment", "session",
"
Well, it could be a list variable.
foo<- 1:7
bar<-1:9
rab<-list(foo,bar)
I suppose I could do something like
oof<-rbind(foo,bar)
write.table(oof) #ignore the warnings
and then ignore or delete the redundant items in the output file.
On 5/8/11 1:51 AM, Joshua Wiley wrote:
Hi Carl,
What wou
At 19:06 08/05/2011, you wrote:
Hello everyone,
I am attempting to use the %in% operator with the ! to produce a NOT IN type
of operation. Why does this not work? Suggestions?
> data2[data1$char1 %in% c("string1","string2"),1]<-min(data1$x1)
> data2[data1$char1 ! %in% c("string1","string2"),1]
On May 7, 2011, at 10:38 AM, Carl Witthoft wrote:
Just wondering how come read.table lets you specify fill=TRUE for
ragged arrays, but so far as I can tell, no equivalent for
write.table?
I imagine the answer is something along the lines of read.table
creates a rectangular structur
Andrew Robinson-6 wrote:
>
> A hack would be to use gsub() to prepend e.g. XXX to the keywords that
> you want, perform a strsplit() to break the lines into component
> strings, and then substr() to extract the pieces that you want from
> those strings.
>
> Cheers
>
> Andrew
>
Thanks, that go
On 08-May-11 09:18:55, Berwin A Turlach wrote:
> G'day Dan,
>
> On Sun, 8 May 2011 05:06:27 -0400
> Dan Abner wrote:
>
>> Hello everyone,
>> I am attempting to use the %in% operator with the ! to produce
>> a NOT IN type of operation. Why does this not work? Suggestions?
>>
>> > data2[data1$cha
Dear R users:
I tried to use val.surv to give an internal validation of survival
prediction model.
I used the sample sources.
# Generate failure times from an exponential distribution
set.seed(123) # so can reproduce results
n <- 1000
age <- 50 + 12*rnorm(n)
sex <- factor(sample(c('
Hi,
On 8 May 2011 21:18, Berwin A Turlach wrote:
> G'day Dan,
>
> On Sun, 8 May 2011 05:06:27 -0400
> Dan Abner wrote:
>
>> Hello everyone,
>>
>> I am attempting to use the %in% operator with the ! to produce a NOT
>> IN type of operation. Why does this not work? Suggestions?
Alternatively,
ex
G'day Dan,
On Sun, 8 May 2011 05:06:27 -0400
Dan Abner wrote:
> Hello everyone,
>
> I am attempting to use the %in% operator with the ! to produce a NOT
> IN type of operation. Why does this not work? Suggestions?
>
> > data2[data1$char1 %in% c("string1","string2"),1]<-min(data1$x1)
> > data2[
Hello everyone,
I am attempting to use the %in% operator with the ! to produce a NOT IN type
of operation. Why does this not work? Suggestions?
> data2[data1$char1 %in% c("string1","string2"),1]<-min(data1$x1)
> data2[data1$char1 ! %in% c("string1","string2"),1]<-max(data1$x1)+1000
Error: unexpe
Dear Patrick,
Thanks for your reply, I know its hectic to c such graphs, as they are
difficult to interpret, but I got this interesting link from R
http://www.oga-lab.net/RGM2/func.php?rd_id=gplots:venn, mentioned about venn
diagram for 5 subsets.
## Example using a list of item names belonging
On May 7, 2011, at 16:15 , Ben Haller wrote:
> On May 6, 2011, at 4:27 PM, David Winsemius wrote:
>
>> On May 6, 2011, at 4:16 PM, Ben Haller wrote:
>>>
>>
>>> As for correlated coefficients: x, x^2, x^3 etc. would obviously be highly
>>> correlated, for values close to zero.
>>
>> Not just
thanks a lot to u guys !
both works well!
--
View this message in context:
http://r.789695.n4.nabble.com/help-warning-only-the-first-element-has-been-used-tp3505837p3506459.html
Sent from the R help mailing list archive at Nabble.com.
__
R-help@r-pro
74 matches
Mail list logo