Dear Prof. Harrell,
I'm sorry to say this, but I'm afraid I cannot understand what you write
very well. Do you mean that the method to calculate confidence intervals
for Dxy or C statistics in logistic model penalized for overfitting has
not been established yet and what I did is wrong?
Could
Hello,
I was hoping that someone would be able to help me or at least point me in
the right direction regarding a problem I am having. I am a new R user, and
I've been trying to read tutorials but they haven't been much help to me so
far.
The problem is relatively simple as I've already created w
Hi R Users
I am working with the very useful SNA package (v.2.2) in R and have a
query I hope you may be able to help out with:
I have been using gplot commands to plot an SNA graph. Here's the code
and output:
library(sna); library(network); library(RODBC)
setwd("c:\\temp")
x = read.csv(fi
Thanks Robert. That all seems to work. I also found the MASS::Null() function
that gives the null space for the matrix(transpose) given as argument. I am
still trying to appreciate the math behind the Moore-Penrose inverse matrix.
If you have any suggestions for understanding how to use R to solve
Just learned another trick today. Thanks a lot to both of you for the kind
help!
Gang
On Sun, May 22, 2011 at 6:04 PM, Dennis Murphy wrote:
> Hi:
>
> library(reshape2)
> d1 <- melt(d, id = 'Subj')
> d1 <- cbind(d1, colsplit(d1$variable, '_', c('Time', 'Cond')))
> d1 <- transform(d1,
>
If you want to only match names of length 6, you will have to use this pattern:
> x <- c("ZFHSJK", "ZFHJKZ","ZIOPWE","ZLKJSD","ZKFLPZ", "ZAAZ", "ZAZ",
+ "ZZAZ", "ZRITEZ")
> # match exactly values of length 6
> len6 <- "^Z[[:alpha:]]{4}Z$"
> grep(len6, x)
[1] 2 5 9
>
On Sun, May 22, 2
Hi:
library(reshape2)
d1 <- melt(d, id = 'Subj')
d1 <- cbind(d1, colsplit(d1$variable, '_', c('Time', 'Cond')))
d1 <- transform(d1,
Time = substr(Time, 2, 2),
Cond = substr(Cond, 5, 5))[c(1, 4, 5, 3)]
str(d1)
d1
You can decide whether to leave Time and Cond as char
Thanks!
On May 21, 7:09 am, David Winsemius wrote:
> On May 20, 2011, at 11:57 AM, Kang Min wrote:
>
> > Hi all,
>
> > I'm trying to subset a pattern in a vector. Each argument has 6
> > letters, and I need those that start with Z and end with Z.
>
> > e.g.
> > x <- c("ZFHSJK", "ZFHJKZ","ZIOPWE",
On May 22, 2011, at 5:25 PM, Gang Chen wrote:
I know how to convert a simple dataframe from wide to long format
with one
varying factor. However, for a dataset with two factors like the
following,
Subj T1_Cond1 T1_Cond2 T2_Cond1 T2_Cond2
1 0.125869 4.108232 1.099392 5.556614
2 1.
I know how to convert a simple dataframe from wide to long format with one
varying factor. However, for a dataset with two factors like the following,
Subj T1_Cond1 T1_Cond2 T2_Cond1 T2_Cond2
1 0.125869 4.108232 1.099392 5.556614
2 1.427940 2.170026 0.120748 1.176353
How to eleg
Hi:
Here are a few options for making this type of plot:
# ggplot2
library(ggplot2)
ggplot(dd, aes(x = Age.at.Sample.Collection, y = MCP1, group =
Subject.ID, colour = Subject.ID,
shape = Group)) +
geom_point(size = 2.5) + geom_line(size = 0.6) + labs(x = 'Age')
ggplot(dd,
Hi all,
i have a question about a makeChunks function from tm package.
I have a text with constructed with a SQL qurey consisting of several rows in
a table. The texts should be around 1000 lines but is now one long line of
text.
My question is :
Does this matter in makeChunks()
I am trying to plot an nMDS plot using ggplot2. My rownames are coded so
that they can be broken down by Site, Species, Treatment, or Replicate based
on unique separators. There are no column headers. I am having trouble
coding ggplot2 to plot by Site -or- Species -or- Treatment and NOT by all
u
I will post the whole function, but I believe the problem is in the 3th part.
The issue is that oilDF has different number of rows than oilDF2.
Thank you,
Rui
myScan <- function(dirPath, num)
{
#dirPath is the name of the directory where we want to apply the function. It
should be called from
On May 22, 2011, at 3:40 PM, David Winsemius wrote:
On May 22, 2011, at 2:11 AM, Jeroen Ooms wrote:
I need to convert a dataframe to a record-structure, to be able to
encode it
later in JSON. Suppose this is the data:
mydata <- data.frame(foo=1:3, bar=c("M","M","F"));
I would like to con
On May 22, 2011, at 2:11 AM, Jeroen Ooms wrote:
I need to convert a dataframe to a record-structure, to be able to
encode it
later in JSON. Suppose this is the data:
mydata <- data.frame(foo=1:3, bar=c("M","M","F"));
I would like to convert this to a unnamed list (json array) of key-
value
On May 22, 2011, at 3:22 PM, Jeroen Ooms wrote:
apply() operates on arrays and a data frame will be coerced to a
matrix
(which requires all elements to be of the same type). This is
documented in
?apply.
Thanks, I was not aware of that. I implicitly assumed there would be a
specific ap
>
> apply() operates on arrays and a data frame will be coerced to a matrix
> (which requires all elements to be of the same type). This is documented in
> ?apply.
>
Thanks, I was not aware of that. I implicitly assumed there would be a
specific apply.data.frame.
> This may not be elegant, but
Hi Kohkichi,
What we really need to figure out is how to make validate give you
confidence intervals for Dxy or C while it is penalizing for overfitting.
Some people have ad hoc solutions for that but nothing is nailed down yet.
Frank
khosoda wrote:
>
> Thank you for your comment, Prof Harrell.
On May 22, 2011, at 12:35 PM, Dave Evens wrote:
Dear all,
I'm fitting a linear model with numerous lag terms of the response
variable [i.e. y(t-1), y(t-2),y(t-3)...,] and other explanatory
variables [x(1), x(2), x(3),]- which go into my design matrix X.
I'm fitting the linear model:
On May 22, 2011, at 2:41 PM, David Winsemius wrote:
On May 22, 2011, at 2:22 PM, David Hajage wrote:
moreover:
> library(ascii)
Seems strange that the ascii.interger function doesn't set the
digits argument to 0:
ascii.integer
> ascii(as.integer(c(3,4,5)))
|=
| 3
On May 22, 2011, at 2:22 PM, David Hajage wrote:
moreover:
> library(ascii)
Seems strange that the ascii.interger function doesn't set the digits
argument to 0:
> ascii(as.integer(c(3,4,5)))
|=
| 3.00 | 4.00 | 5.00
|=
> ascii(as.integer(c(3,4,5)),
here is the data set, yes i am doing spagghetti plots for each Subject for
MCP1 with respect to the Age.at.Sample.Collection, with a final of all the
controls and all the cases
Subject.ID sample Group Age.at.Sample.CollectionMCP1
19 00173-0 3455 control11.767282 2
Hi Josh,
Sorry, your examples have equal number of rows in both df and df2.
In my situation they haven't.
Strangely, your solution have worked only when I am copy post the code into the
command line.
If I use the code inside of a function I get an error at:
return(ds)
ERROR: arguments imply d
Dear all,
I'm fitting a linear model with numerous lag terms of the response variable
[i.e. y(t-1), y(t-2),y(t-3)...,] and other explanatory variables [x(1), x(2),
x(3),]- which go into my design matrix X.
I'm fitting the linear model: lm(Y ~ X, ...).
I would like to use the predict.lm f
Hi Rui,
data frames must have the same number of rows, but two different data
frames stored within a list do not need to have the same number of
rows. Can you please post the code that is giving the error?
Josh
On Sun, May 22, 2011 at 9:41 AM, Rui Maximo wrote:
> Hi Josh,
>
> Sorry, your examp
moreover:
> library(ascii)
> M <- matrix(letters[1:10], 2)
> M
[,1] [,2] [,3] [,4] [,5]
[1,] "a" "c" "e" "g" "i"
[2,] "b" "d" "f" "h" "j"
> ascii(M)
|
| a | c | e | g | i
| b | d | f | h | j
|
> print(ascii(M), "rest")
+---+---+---+---+---+
| a |
Thank you for your comment, Prof Harrell.
I changed the function;
CstatisticCI <- function(x) # x is object of rcorr.cens.
{
se <- x["S.D."]/2
Low95 <- x["C Index"] - 1.96*se
Upper95 <- x["C Index"] + 1.96*se
cbind(x["C Index"], Low95, Upper95)
}
> CstatisticCI(MyModel.lr
> From: marchy...@hotmail.com
> To: rvarad...@jhmi.edu; pda...@gmail.com; alex.ols...@gmail.com
> Date: Sat, 21 May 2011 20:40:44 -0400
> CC: r-help@r-project.org
> Subject: Re: [R] maximum likelihood convergence reproducing Anderson Blundell
> 1982 Eco
I see..
Row1 of Table 2 gives averages for category 3 in the group with a zero in
cols 6-8 AND col 2.
I wanted to averages for category 3 in the group with a zero in cols 6-8 and
a 1 in col 2.
I still think its suspicious that cols V1 and V2 in Table 1 are the same.
--
View this message in conte
Axel, you may also be interested in the ascii function (in the ascii
package). The ascii version of David's example is
library(ascii) #may need install.packages("ascii") first
ascii(M)
ascii(table(sample(1:10, 100, replace=TRUE)))
Best,
Ista
On Sun, May 22, 2011 at 9:52 AM, David Winsemius wrote
Thank you very much for the tip! Using imagemagick i got an image of reasonable
quality without making the file size that large. Regards Roman Von:
"Philipp Pagel-5 [via R]"
Gesendet: 20.05.2011
09:50:42 An: Layman123 Betre
Hi Ravi,
There are a couple of ways to do it. See chapter 4 of the MikTeX documentation.
Best,
Ista
PS. List: Is there any reason why Sweave.sty should not be distributed
with the major LaTeX distributions (TeXlive, MacTeX, MikTeX)? Every
time I add Sweave.sty to my texmf directory I wonder about
S.D. is the standard deviation (standard error) of Dxy. It already includes
the effective sample size in its computation so the sqrt(n) terms is not
needed. The help file for rcorr.cens has an example where the confidence
interval for C is computed. Note that you are making the strong assumption
On May 22, 2011, at 7:47 AM, Axel Urbiz wrote:
is it possible to add dash lines to tables or matrices when they are
printed? An example of what I'm looking for is this:
library(Design)
y <- sample(c(0,1),100, replace = TRUE)
x <- rnorm(100)
summary(y ~ x)
There is a method for summary on for
Hi Adele,
it was not my intention to critizise you for posting your question. You
are totally free to post whatever question you like and the reciepient
is then free to answer it or not. I wanted, however, to demonstrate to
you that it would have been easier in my opinion to research some of
Thanks for your reply David.
I didn't realize I could change the title of my post! Haha.
I rather like the example because Table 1 actually appears in Cameron and
Trivedi (potential error and all!).
aperm is not the issue. I am not sure why you get different output, it
should be the case.
Other
is it possible to add dash lines to tables or matrices when they are
printed? An example of what I'm looking for is this:
library(Design)
y <- sample(c(0,1),100, replace = TRUE)
x <- rnorm(100)
summary(y ~ x)
Thanks,
Axel.
[[alternative HTML version deleted]]
___
Hi Jim,
I think i sorted it out how to read and write each vector separately. Thanks
a lot. It was exactly what i wanted to do.
best,
salih
On Sat, May 21, 2011 at 11:41 PM, jim holtman wrote:
> Is this what you are after:
>
> > x = c(1 ,2 ,4 ,7 ,9 ,10 ,15)
> > # partition if the difference is >
On 2011-05-21 23:11, Jeroen Ooms wrote:
I need to convert a dataframe to a record-structure, to be able to encode it
later in JSON. Suppose this is the data:
mydata<- data.frame(foo=1:3, bar=c("M","M","F"));
I would like to convert this to a unnamed list (json array) of key-value
pairs. For exa
Hi,
I'm trying to calculate 95% confidence interval of C statistic of
logistic regression model using rcorr.cens in rms package. I wrote a
brief function for this purpose as the followings;
CstatisticCI <- function(x) # x is object of rcorr.cens.
{
se <- x["S.D."]/sqrt(x["n"])
Low95 <
I need to convert a dataframe to a record-structure, to be able to encode it
later in JSON. Suppose this is the data:
mydata <- data.frame(foo=1:3, bar=c("M","M","F"));
I would like to convert this to a unnamed list (json array) of key-value
pairs. For example like this:
apply(data.frame(foo=1:3
"localhost" is the computer you are working at, and the ip assigned to the
loob-back interface. This is normally used for testing networking interfaces.
That being so, simply using the path to the file on your machine, e.g.
"/home//data/somedata.csv" should work much better.
JWD
43 matches
Mail list logo