Frank E Harrell Jr [EMAIL PROTECTED] writes:
Deepayan Sarkar wrote:
On 9/26/06, Frank E Harrell Jr [EMAIL PROTECTED] wrote:
I think this is new since a previous version of R:
h - function(x, trantab) trantab[x]
w - 6:4
names(w) - c('cat','dog','giraffe')
w
cat
Hi,
is it correct that multiple-Imputation like mice
http://www.imputation.com can't understand as a standard data-mining
task, beacuse i haven't a generalization mechanism perform the model on
complete new and bigger dataset with a predict method!?
many thanks regards,
christian
Jeffrey Horner [EMAIL PROTECTED] writes:
Seth Falcon wrote:
Wow, looks neat.
OS X users will be unhappy with your naming choice as the default
filesystem there is not case-sensitive :-(
IOW, r and R do the same thing. I would expect it to otherwise work
on OS X so a change of some sort
Hello sir:
As to the 2*2 table format for reporting results comparing a new test to true
diagnosis,when I got the sensitivity and specificity,how can I calculate the
exact 95% confidence intervals (based on the binomial distribution) for
sensitivity and specificity via R?
Thanks a lot!
My
Hi,
I am writing a function and need to pass a function expression as an
argument, for instance,
myfun - function( express) {
x- c(1,2,3)
y-express
}
if I call the above function by myfun( x*2 ), I get 2 as the result,
Tong Wang [EMAIL PROTECTED] writes:
Hi,
I am writing a function and need to pass a function expression as an
argument, for instance,
myfun - function( express) {
x- c(1,2,3)
y-express
}
if I call the above function
That's exactly what I was looking for...
Thanks!
Gunther
-Ursprüngliche Nachricht-
Von: Uwe Ligges [mailto:[EMAIL PROTECTED]
Gesendet: Dienstag, 26. September 2006 10:13
An: Gunther Höning
Cc: r-help@stat.math.ethz.ch
Betreff: Re: [R] Accessing C- source code of R
Gunther Höning
XinMeng [EMAIL PROTECTED] writes:
Hello sir:
As to the 2*2 table format for reporting results comparing a new
test to true diagnosis,when I got the sensitivity and
specificity,how can I calculate the exact 95% confidence intervals
(based on the binomial distribution) for sensitivity and
I'm trying to merge two data frames. One of them is a zero rows data
frame.
I'm using the merge parameter 'all.x = TRUE' so I'd expect to obtain all
the rows of x. In fact the merge help says:
all.x: logical; if 'TRUE', then extra rows will be added to the
output, one for each row in
Hi
I found on google that there is an implementation of hot-deck imputation in
SAS:
http://ideas.repec.org/c/boc/bocode/s366901.html
Is there anything similar in R?
Many Thanks
Eleni Rapsomaniki
__
R-help@stat.math.ethz.ch mailing list
I'm not sure if this is exactly what you're after, but it might be worth
looking at aregImpute in the Hmisc package.
On 27/09/06, Eleni Rapsomaniki [EMAIL PROTECTED] wrote:
Hi
I found on google that there is an implementation of hot-deck imputation
in
SAS:
Hello R helpers,
I am trying to do a linear OLS regression of y on two variables x1 and
x2. I want to constrain the coefficients of x1 and x2 to sum up to 1.
and therefore run a constrained OLS. Can anybody help with this? (I have
seen some answers to similar questions but it was not clear to me
Have a look at the linear.hypothesis function in the car package. For example:
mod.duncan - lm(prestige ~ income + education, data=Duncan)
linear.hypothesis(mod.duncan, income + education = 1)
Linear hypothesis test
Hypothesis:
income + education = 1
Model 1: prestige ~ income + education
Gabor Grothendieck wrote:
I think this is quoted out of context. I was referring to Duncan's post
which shows an example of piping R code.
No, that was Jeffrey's post that showed the pipe. All that was in my
post was a question about why this isn't a patch to the standard R
script. I
Jeffrey Horner wrote:
Seth Falcon wrote:
Jeffrey Horner [EMAIL PROTECTED] writes:
[...]
littler will install into /usr/local/bin by default, so I don't think
there's a clash with the Mac binary provided by CRAN, right?
It depends what you mean by clash :-)
If both
you could reparameterize, e.g.,
x1 - runif(100, -4, 4)
x2 - runif(100, -4, 4)
X - cbind(1, x1 , x2)
y - rnorm(100, as.vector(X %*% c(5, -3, 4)), 2)
##
fn - function(betas){
betas - c(betas, 1 - betas[2])
crossprod(y - X %*% betas)[1, ]
}
opt - optim(c(5, -3), fn,
On 27 Sep 2006 10:57:15 +0200, Peter Dalgaard [EMAIL PROTECTED] wrote:
Tong Wang [EMAIL PROTECTED] writes:
Hi,
I am writing a function and need to pass a function expression as an
argument, for instance,
myfun - function( express) {
x- c(1,2,3)
On 9/27/2006 7:06 AM, Duncan Murdoch wrote:
Gabor Grothendieck wrote:
I think this is quoted out of context. I was referring to Duncan's post
which shows an example of piping R code.
No, that was Jeffrey's post that showed the pipe. All that was in my
post was a question about why
[EMAIL PROTECTED] wrote:
Hi,
is it correct that multiple-Imputation like mice
http://www.imputation.com can't understand as a standard data-mining
task, beacuse i haven't a generalization mechanism perform the model on
complete new and bigger dataset with a predict method!?
many
Peter Dalgaard wrote:
XinMeng [EMAIL PROTECTED] writes:
Hello sir:
As to the 2*2 table format for reporting results comparing a new
test to true diagnosis,when I got the sensitivity and
specificity,how can I calculate the exact 95% confidence intervals
(based on the binomial
Dear all,
I run a linear model with three significant explanatory variabels
x1: a factor with 4 levels
x2 and x3: factors with two levels each
x4: continuous
model - lm(y ~ x1 + x2 * x3 + x4)
The data is not perfectly balanced between the different
factor-combinations and I use treatment
Hi All
The device commands pdf and postscript allow you to specify the width
and height of a page. However, each subsequent plot is drawn on a
separate page. Is there a way to change the page size part way through?
For instance, is there an equivalent to the function pdfresize below?
check package binom.
I hope it helps.
Best,
Dimitris
Dimitris Rizopoulos
Ph.D. Student
Biostatistical Centre
School of Public Health
Catholic University of Leuven
Address: Kapucijnenvoer 35, Leuven, Belgium
Tel: +32/(0)16/336899
Fax: +32/(0)16/337015
Web: http://med.kuleuven.be/biostat/
Henrik Parn wrote:
Dear all,
I run a linear model with three significant explanatory variabels
x1: a factor with 4 levels
x2 and x3: factors with two levels each
x4: continuous
model - lm(y ~ x1 + x2 * x3 + x4)
The data is not perfectly balanced between the different
Hi,
I would like to read values from an ASCII text file that contains
information in the following format:
DEVICE = 'PC'
CPU_SPEED = '1999', '233'
...
It's like a config file.
How can I e.g. get R to read the 2nd value of CPU_SPEED?
How do I go through text files and search for keywords and
Hi,
I would like to read values from an ASCII text file that contains
information in the following format:
DEVICE = 'PC'
CPU_SPEED = '1999', '233'
...
It's like a config file.
How can I e.g. get R to read the 2nd value of CPU_SPEED?
How do I go through text files and search for keywords and
# using this test data
set.seed(1)
x - 1:20/20
y - exp(2 + 3 * x) + rnorm(20)
# if its ok to fit logs so that its linear
exp(fitted(lm(log(y) ~ x)))
1 2 3 4 5 6 7 8
8.55615 9.94692 11.56376 13.44340 15.62857 18.16894
Frank E Harrell Jr [EMAIL PROTECTED] writes:
Peter Dalgaard wrote:
XinMeng [EMAIL PROTECTED] writes:
Hello sir:
As to the 2*2 table format for reporting results comparing a new
test to true diagnosis,when I got the sensitivity and
specificity,how can I calculate the exact 95%
Hi
you have two options:
change the source code for merge
or use some modified function like
my.merge - function(x,y, ...) if(all(dim(x)[1]0, dim(y)[1]0))
merge(x,y) else print (No merge or whatever action which is
suitable)
HTH
Petr
On 27 Sep 2006 at 11:55, Bonfigli Sandro wrote:
Date
Read in data using readLines and replace
= with comma and delete all spaces.
Then reread using read.table and set the
rownames to column 1 removing column 1.
# test data
Lines0 - DEVICE = 'PC'
CPU_SPEED = '1999', '233'
# if reading from a file then
# replace next line with something like Lines
Dear All,
I wonder if there is any implemented statistical test in R to test the
equality between many correlations. As an example, let X1, X2, X3 X4 be four
random variables. let
Phi(X1,X2) , Phi(X1,X3) and Phi(X1,X4) be the corresponding correlations.
How to test Phi(X1,X2) =
Something like this?
library(Hmisc)
t - readLines(clipboard)
t
[1] DEVICE = 'PC' CPU_SPEED = '1999', '233'
ix - grep(CPU_SPEED,t)
loc - substring.location(t[ix],,)
cpu - substring(t[ix],loc$first+2)
cpu
[1] '233'
On 27/09/06, Andre Jung [EMAIL PROTECTED] wrote:
Hi,
I
Here is one more solution using the same Lines0 from last time.
This one uses strapply from gsubfn to pick out all the fields in
each line creating a list named by the keywords (rather than
a data frame as in the previous solution). The names of the
components are the keywords so we remove them
Dear all,
Does any know how to solve PDE with R? The archive list refers to the
use of ODE if PDE are parabolic. I am not a mathematician and this does
not mean anything for me!
help would be very appreciated.
Many thanks
--
___
Christophe
Here is a slight simplification of this one using row.names= in
the read.table to avoid the subsequent manipulations. We
use Lines0 defined in the earlier post:
# replace next line with something like Lines - readLines(myfile.dat)
Lines - readLines(textConnection(Lines0))
Lines - gsub(=, ,,
Number of subjects = 25
Mean of Sample = 77
Standard Deviation (s) = 12
sem = 2.4
df = 24
The claim is that population mean is less than 80
* 80
So our H0 (null hupotheis) is * 80
qt(.95,24)
[1] 1.710882
qt(0.05, 24)
[1] -1.710882
tstat = -1.25 on t24 falls between 1.711 (.95,24) and
Marc,
Off the top my head (i.e. this could all be horribly wrong), I think
Anderson gave an asymptotic version for such a test, whereby under the
null hypothesis, the difference between Fisher's z for each sample, z1 -
z2, is normal with zero mean. If I recall correctly, the 1984 edition
gave a
In the process of moving a number of my scripts from MATLAB - R, I've
discovered that there is no 'pure' equivalent of MATLAB's cell arrays,
which I use quite often. Basically, I create matrices (as a cell array)
where each element of the matrix is itself a matrix (e.g., 2x2 cell
array where
-Original Message-
From: [EMAIL PROTECTED] [mailto:r-help-
[EMAIL PROTECTED] On Behalf Of Isaac Barjis
Sent: Wednesday, September 27, 2006 8:08 AM
To: R-help@stat.math.ethz.ch
Subject: [R] t-stat Curve
Number of subjects = 25
Mean of Sample = 77
Standard Deviation (s) = 12
sem
Hello,
I use the package e1071 for svm classification. I would like to get
probabilities associated with predictions.
But when I change the argument 'probability' (TRUE or FALSE) in functions
svm.model() and predict() , I don't have the same prediction.
Do you know why there are these
matrix(some_list, nr, nc, byrow=TRUE) may be what you are looking for.
R arrays can be of any vector type, including list. I'd get used to R's
Fortran ordering rather than force transposes all the time.
On Wed, 27 Sep 2006, Evan Cooch wrote:
In the process of moving a number of my scripts
Try this:
AA - matrix(list(A, 10*A, 100*A, 1000*A), 2, byrow = TRUE)
AA[1,2]
On 9/27/06, Evan Cooch [EMAIL PROTECTED] wrote:
In the process of moving a number of my scripts from MATLAB - R, I've
discovered that there is no 'pure' equivalent of MATLAB's cell arrays,
which I use quite often.
Hi,
I am trying to fit experimental points by exponemtial curve
my data are stored into a matrix data
the first column is the geographical point (a number = data[,1] ) ( I
would like to plot several graphes at the same time)
the second column is the time of measurement (x in the plot)
the
Isaac:
You will likely find something helpful here:
http://addictedtor.free.fr/graphiques/thumbs.php
I also recently came across this code (I thought it was at the URL above,
but I can't find it now) that may be useful with modification.
I apologize to the code-writer for having lost the
Look at the arguments to panel.curve
?panel.curve
and try RSiteSearch(panel.curve) for some examples.
On 9/27/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
Hi,
I am trying to fit experimental points by exponemtial curve
my data are stored into a matrix data
the first column is the
Prof Brian Ripley wrote:
matrix(some_list, nr, nc, byrow=TRUE) may be what you are looking for.
R arrays can be of any vector type, including list. I'd get used to
R's Fortran ordering rather than force transposes all the time.
Thanks very much. And I thought I'd left some aspects of my
Gabor Grothendieck wrote:
Try this:
AA - matrix(list(A, 10*A, 100*A, 1000*A), 2, byrow = TRUE)
AA[1,2]
Seems to do the trick. Thanks!
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting
Peter Dalgaard wrote:
Frank E Harrell Jr [EMAIL PROTECTED] writes:
Peter Dalgaard wrote:
XinMeng [EMAIL PROTECTED] writes:
Hello sir:
As to the 2*2 table format for reporting results comparing a new
test to true diagnosis,when I got the sensitivity and
specificity,how can I calculate the
Just one other comment if the matrices have the same dimensions:
they could alternately be represented as a 4d array:
A - matrix(1:4, 2)
AA - matrix(list(A, 10*A, 100*A, 1000*A), 2, byrow = TRUE)
AA[1,2]
AAA - array(unlist(AA), c(2,2,2,2))
AAA[,,1,2] # same
This could have an
Gabor Grothendieck wrote:
Just one other comment if the matrices have the same dimensions:
Indeed - that is quite often the case - thanks for the further
suggestion(s).
they could alternately be represented as a 4d array:
A - matrix(1:4, 2)
AA - matrix(list(A, 10*A, 100*A, 1000*A), 2,
I am having trouble with getting AIC statistics. I have developed a
number of ancova models using the lm function. I am trying to get a
number of AIC statistics suggested by Burnham and Anderson (2002)
including raw AIC values, AICc values, Akaike weights, and Delta AIC.
When I use the
Hi Christophe,
What is the PDE that you are trying to solve? Is it
parabolic/hyperbolic/elliptical/somethingelse? Is it linear/nonlinear?
If time is one of the independent variables, you can transform the PDE into
an initial value problem (system of ODEs) by using finite difference
I would like to use readBin to read a binary data
file. Most of the data is 4-byte floating point but,
for some reason, only double precision appears to be
offered. I tried
fVariable=readBin(iFile,what=single());
and got 35.87879 which looks believable except that
the correct value is 3.030303.
Hello,
What is the best way to concatenate POSIXct objects keeping the time zone
attribute in a program? For example:
R xx - as.POSIXct(strptime(c(2006-09-26 12:00:00, 2006-09-26 13:00:00),
+ format=%Y-%m-%d %H:%M:%S), tz=GMT)
R xx
[1] 2006-09-26 12:00:00 GMT
Peter Lauren said the following on 9/27/2006 3:11 PM:
I would like to use readBin to read a binary data
file. Most of the data is 4-byte floating point but,
for some reason, only double precision appears to be
offered. I tried
fVariable=readBin(iFile,what=single());
and got 35.87879
--- Sundar Dorai-Raj [EMAIL PROTECTED] wrote:
Peter Lauren said the following on 9/27/2006 3:11
PM:
I would like to use readBin to read a binary data
file. Most of the data is 4-byte floating point
but,
for some reason, only double precision appears to
be
offered. I tried
Hi,
I have Forecast Class and Observed Class in a data matrix as below.
Sample1
FCT OBS
1 1 5
2 2 4
3 3- 3+
4 3 3
5 3+ 3-
6 4 2
7 5 1
I want to find the difference between Observed and Forecast Classes.
How can I get this done?
I tried to following to convert the 1
## There is some ambiguity in your example.
## You stated a one-sided hypothesis and calculated qt() values for both sides.
## I show both the one-sided and two-sided displays.
library(HH)
## HH_1.5 is available from CRAN for R-2.3.1
##
## HH_1.5 ignores the df.t argument and interprets the
Does R provide a function analogous to LS() or str() that reports the
storage space, on disk or in memory, required by objects?
Ben Fairbank
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the
Then, I tried to convert them to numbers using the following.
Sample1$FCT2 - as.numeric(Sample1$FCT2)
Sample1$OBS2 - as.numeric(Sample1$OBS2)
This is actually an FAQ. Do the following and it should be fine:
Sample1$FCT2 - as.numeric(as.character(Sample1$FCT2))
Sample1$OBS2 -
Here is a function I use:
my.ls - function(pos=1, sorted=F){
.result - sapply(ls(pos=pos, all.names=TRUE),
function(..x)object.size(eval(as.symbol(..x
if (sorted){
.result - rev(sort(.result))
}
.ls - as.data.frame(rbind(as.matrix(.result),**Total=sum(.result)))
See ll() in the R.oo package. /Henrik
On 9/27/06, Ben Fairbank [EMAIL PROTECTED] wrote:
Does R provide a function analogous to LS() or str() that reports the
storage space, on disk or in memory, required by objects?
Ben Fairbank
__
Dear all,
I want to design a histogram and I need to have the frequency at certain
points. For example I have the following 2 columns:
*X Y*
0.125
0.422
0.45 11
0.55 21
I want the chart to have 4 columns. First column is from 0.0-0.1 (on X) and
frequency is 25. Next colum is
Hi,
There may be an easier way but here is one way you can do it.
# create vector that has Y[i] X[i]s
new.data - rep(X,Y)
hist(new.data, breaks=c(0,.1,.4,.6)) # or something like that look at
what exactly breaks should be.
Ritwik.
On 9/27/06, Mohsen Jafarikia [EMAIL PROTECTED] wrote:
Dear
On Wed, 2006-09-27 at 18:29 -0400, Mohsen Jafarikia wrote:
Dear all,
I want to design a histogram and I need to have the frequency at certain
points. For example I have the following 2 columns:
*X Y*
0.125
0.422
0.45 11
0.55 21
I want the chart to have 4 columns.
I tried to use Frank's formatting improvements to compile Sweave-
produced .tex, but it doesn't seem to make a difference. Advice?
On Sep 25, 2006, at 9:31 AM, Frank E Harrell Jr wrote:
This is what I have been using. Does anyone have a better way? In
particular I would like to see letters
I am hoping for some advice regarding the difficulties I have been having
recoding variables which are contained in a csv file. Table 1 (below)
shows there are two types of blanks - as reported in the first two
columns. I am using windows XP the latets version of R.
When blanks cells are
Hi,
I am trying to fit a function of the form:
y = A0 + A1 * exp( -0.5* ( (X - Mu1) / Sigma1 )^2 ) - A2 * exp ( -0.5*
( (X-Mu2)/Sigma2 )^2 )
i.e. a mean term (A0) + a difference between two gaussians.
The constraints are A1,A2 0, Sigma1,Sigma20, and usually Sigma2Sigma1.
The plot looks
Similar question was recently asked. See this thread:
http://comments.gmane.org/gmane.comp.lang.r.general/69592
On 9/28/06, Suresh Krishna [EMAIL PROTECTED] wrote:
Hi,
I am trying to fit a function of the form:
y = A0 + A1 * exp( -0.5* ( (X - Mu1) / Sigma1 )^2 ) - A2 * exp ( -0.5*
(
I can propose a strategy.
This example shows that there are different types of blanks when you
look at character data.
as.character(c(, , ,))
Your test for found only one of them.
Look at the data as read.csv produces it. That will probably give you
some clues.
mydata -
70 matches
Mail list logo