On Mar 28, 2011, at 05:36 , Frank Harrell wrote:
> I have a question about the computation of the degrees of freedom in a linear
> model:
>
> x <- runif(20); y <- runif(20)
> f <- lm(y ~ x)
> logLik(f)
> 'log Lik.' -1.968056 (df=3)
>
> The 3 is coming from f$rank + 1. Shouldn't it be f$rank?
On Sun, Mar 27, 2011 at 9:40 PM, AjayT wrote:
> Hi, I'm new to R and I'm stuck trying to import some data from a .dat file
> I've been given. The tricky bit for me is that the data has both variable
> values and labels?
>
> The data looks like this,
>
> Id=1 time=2011-03-27 19:23:40 start=1.4018
Hi everyone,
I am looking to do some manual maximum likelihood estimation in R. I
have done a lot of work in Stata and so I have been using output
comparisons to get a handle on what is happening.
I estimated a simple linear model in R with lm() and also my own
maximum likelihood program. I
Jack Tanner hotmail.com> writes:
> > b = quote(b==3)
>
> Now I want to append "&& x > 2" to the value of b. How do I do that?
Never mind, I figured it out:
substitute(b && x > 2, list(b=b))
__
R-help@r-project.org mailing list
https://stat.ethz.ch/m
AjayT googlemail.com> writes:
> The data looks like this,
>
> Id=1 time=2011-03-27 19:23:40 start=1.4018 end=1.4017
> Id=2 time=2011-03-27 19:23:40 start=1.8046 end=1.8047
Something like this would do:
lines = scan(file, nlines=1, ...)
fields = strsplit(lines[1], "\s+", perl=TR
Hi,
Answers inline:
On Sun, Mar 27, 2011 at 8:50 PM, Wainscott, Robert LT
wrote:
> On R 2.12 for Mac OSX, I have a dataset with both numerical and
> character values.
>
> I want to split dataset "ZIDL", into individual datasets based on the
> string content of variable "Dept".
>
> I can create o
Please start by read ing An Introduction to R. You need to understand
R data structures and how it works AS A LANGUAGE. Forget about Minitab
(while you are in R).
?tapply
-- Bert
On Sun, Mar 27, 2011 at 5:50 PM, Wainscott, Robert LT
wrote:
> On R 2.12 for Mac OSX, I have a dataset with both nu
I have a question about the computation of the degrees of freedom in a linear
model:
x <- runif(20); y <- runif(20)
f <- lm(y ~ x)
logLik(f)
'log Lik.' -1.968056 (df=3)
The 3 is coming from f$rank + 1. Shouldn't it be f$rank? This affects
AIC(f).
Thanks
Frank
-
Frank Harrell
Department of
I have a variable of mode "call":
> b = quote(b==3)
> b
b == 3
Now I want to append "&& x > 2" to the value of b. How do I do that?
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http:
Wainscott, Robert LT cvn74.navy.mil> writes:
> I want to split dataset "ZIDL", into individual datasets based on the
> string content of variable "Dept".
There are many, many ways to do this, depending on what you're really after.
Here's one:
depts = levels(factor(zidl$dept))
for (i in 1:length
Dear Ram Kumar Basent:
I suggest you restore you file is list. I give my example that I read 50
image by 50 folder.
imgA<-list() <-create an empty list
for(i in 1:50) <-how many file you need to looping.
{
imgA[[i]]<-read.jpeg(paste("c:/DataCentre/DataPisA/A",i,"FP3.jpg",sep="")))
}
This i
On R 2.12 for Mac OSX, I have a dataset with both numerical and
character values.
I want to split dataset "ZIDL", into individual datasets based on the
string content of variable "Dept".
I can create one subset dataset at a time using a script I found on the
net, but rather than run the sam
Jeremy thanks a lot for your response
I have read sem package help and I currently reading the help of lavaan
I see that there is also an other function called lavaan can do the SEM analysis
So I wonder what is the difference between this function and the sem function
Also I am wondering in the
Hi, I'm new to R and I'm stuck trying to import some data from a .dat file
I've been given. The tricky bit for me is that the data has both variable
values and labels?
The data looks like this,
Id=1 time=2011-03-27 19:23:40 start=1.4018 end=1.4017
Id=2 time=2011-03-27 19:23:40 start=1.80
"LFP" == Luis Felipe Parra
on Mon, 28 Mar 2011 09:10:33 +0800
LFP> Hello. I am trying to use the portfolio backtesting function
LFP> in fPortfolio
LFP> package, but I don't now why in my version of fPortfolio I
LFP> don't have either
LFP> the portfolioBactest nor the port
Hello. I am trying to use the portfolio backtesting function in fPortfolio
package, but I don't now why in my version of fPortfolio I don't have either
the portfolioBactest nor the portfolioBacktesting functions. Does anybody
knows what might be going on?
thank you
Felipe Parra
[[alterna
> CC: chuan...@hotmail.com; r-help@r-project.org
> From: dwinsem...@comcast.net
> To: marchy...@hotmail.com
> Subject: Re: [R] Asking Favor For the Script of Median Filter
> Date: Sun, 27 Mar 2011 18:30:48 -0400
>
>
> On Mar 27, 2011, at 1:07
Oops. My error! You wanted a 2D filter.
I suspect a search will find some implementation, but you may wish to consider
?loess instead (there are numerous others, no doubt).
-- Bert
On Sun, Mar 27, 2011 at 3:30 PM, David Winsemius wrote:
>
> On Mar 27, 2011, at 1:07 PM, Mike Marchywka wrote:
>
>
?runmed
-- Bert
On Sun, Mar 27, 2011 at 2:44 PM, David Winsemius wrote:
>
> On Mar 27, 2011, at 10:56 AM, chuan_zl wrote:
>
>> Hello,everybody. My name is Chuan Zun Liang. I come from Malaysia. I am
>> just
>> a beginner for R. Kindly to ask favor about median filter. The problem I
>> facing as
On 27 March 2011 12:12, jouba wrote:
> I am a new user of the function sem in package sem and lavaan for
> structural
> equation modeling
> 1. I dont know what is the difference between this function and CFA
> function, I know that cfa for confirmatory analysis but I dont know what
> is the di
On Mar 27, 2011, at 1:07 PM, Mike Marchywka wrote:
You obviously want to delegate inner loops to R packages that
execute as native, hopefully optimized, code.
Generally a google search that starts with "R CRAN" will help.
In this case it looks like a few packages available,
http://www.google
--- On Sun, 3/27/11, Bulent Arikan wrote:
> From: Bulent Arikan
> Subject: [R] overlaying
> To: r-help@r-project.org
> Received: Sunday, March 27, 2011, 5:45 PM
> Dear List,
> I am working with a small (3 columns and 9 rows) data
> table, which contains
> 9 observations, their mean values and
Tena koe
There are many ways. I tend to use the arrows() function. See
?arrows
HTH
Peter Alspach
> -Original Message-
> From: r-help-boun...@r-project.org [mailto:r-help-bounces@r-
> project.org] On Behalf Of Bulent Arikan
> Sent: Monday, 28 March 2011 10:45 a.m.
> To: r-help@r-p
Exactly what do you mean by "import"? What commands are you using?
You can get a list of the files in a directory and then iterate
through reading each one in. If you use 'lapply', you can
'read.table' in some data frames and then 'rbind' them into a single
data frame. You need to be more sp
Hello,
if I want to compare the distributions of two datasets using ggplots,
how should I choose the density type?
More exactly, what assumptions and are behind the "ndensity" and
"density" parameters? And when should they be used?
See http://had.co.nz/ggplot2/stat_bin.html
While I understand th
I am trying to use the "mars" function from "mda" package and cannot figure out
how to specify the response weights "wp" parameter. I have tried a vector of
size = num_observations as well as num_levels of my response, but in both
cases, the function fails with some error about invalid array l
I am a new user of the function sem in package sem and lavaan for structural
equation modeling
1. I don’t know what is the difference between this function and CFA
function, I know that cfa for confirmatory analysis but I don’t know what
is the difference between confirmatory analysis and structu
Dear List,
I am working with a small (3 columns and 9 rows) data table, which contains
9 observations, their mean values and standard deviations (I extracted these
data from a huge set and I cannot use the original data). I plotted means
(y-axis) and the observations (x-axis) using the " plot() " c
On Mar 27, 2011, at 10:56 AM, chuan_zl wrote:
Hello,everybody. My name is Chuan Zun Liang. I come from Malaysia. I
am just
a beginner for R. Kindly to ask favor about median filter. The
problem I
facing as below:
x<-matrix(sample(1:30,25),5,5)
x
[,1] [,2] [,3] [,4] [,5]
[1,]7
Dear Petr
Thank you very much
У Няд, 27/03/2011 у 22:23 +0200, Petr Savicky піша:
> On Sun, Mar 27, 2011 at 10:12:38PM +0300, Denis Kazakiewicz wrote:
> > Hello
> >
> > How to export data frame to file which can be used by gnuplot?
>
> Hello:
>
> Try the following
>
> write.table(dat, file="
Hi:
Try
library(sos) # install first if necessary
findFn('Brier score')
The first place I would look is Frank Harrell's rms package.
HTH,
Dennis
On Sun, Mar 27, 2011 at 1:50 PM, Seth wrote:
> Hi,
>
> I have probability estimates from two predictive models. I have these
> estimates and
Dear all,
I've been trying to find how to compare tow different heatmaps but I'm having
trouble getting the colors bar to be the same. I'm doing something like the
following:
library(gplots)
dat<-cor(matrix(rnorm(100, m=10), nrow=10))
mat<-cor(matrix(rnorm(100), nrow=10))
dev.new()
heatmap.2(ma
Hi,
I have probability estimates from two predictive models. I have these
estimates and also a binary outcome for a validation data set not used in
calibrating either model. I would like to calculate the Brier score for
both models on this binary outcome and test the hypothesis that the Brier
sc
Not with the code as it is provided. However with a reasonably easy
modification to map.grid() (to return the coordinates of the red dotted
line) and a call to polygon(), what you want can be achieved.
Let me know if you need further details.
Ray Brownrigg
On 03/26/11 10:11, Saptarshi Guha wrot
On Sun, Mar 27, 2011 at 10:12:38PM +0300, Denis Kazakiewicz wrote:
> Hello
>
> How to export data frame to file which can be used by gnuplot?
Hello:
Try the following
write.table(dat, file="out.txt", row.names=FALSE, col.names=FALSE,
quote=FALSE)
This will save a space delimited file. I am
Paul Murrell auckland.ac.nz> writes:
>
> Hi
>
> On 28/03/2011 8:13 a.m., Al Roark wrote:
> >
> > Hi All: I've been struggling for a while trying to get grImport up
> > and running. I'm on a Windows 7 (home premium 64 bit) machine
> > running R-2.12.2 along with GPL Ghostscript 9.01. I've set m
Hi
On 28/03/2011 8:13 a.m., Al Roark wrote:
Hi All: I've been struggling for a while trying to get grImport up
and running. I'm on a Windows 7 (home premium 64 bit) machine
running R-2.12.2 along with GPL Ghostscript 9.01. I've set my Windows
PATH variable to point to the Ghostscript \bin and
Hi All:
I've been struggling for a while trying to get grImport up and running. I'm on
a Windows 7 (home premium 64 bit) machine running R-2.12.2 along with GPL
Ghostscript 9.01.
I've set my Windows PATH variable to point to the Ghostscript \bin and \lib
directories, and I've created the R_GS
Hello
How to export data frame to file which can be used by gnuplot?
P.S. Sorry for naive question
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide
On 27/03/2011 1:12 PM, Alexander Engelhardt wrote:
Hi,
I'm just starting out with Sweave, and I can't get a plot(linmod) to
display all four plots:
<< bild>>=
x1<- runif(100)
x2<- rexp(100)
y<- 3 + 4*x1 + 5*x2 + rnorm(100)
mod<- lm(y~x1+x2)
plot(mod)
@
Some Text
<>=
<>
@
This plots only the
That is essentially zero, because you are so far out in the left tail of the
distribution. So, you can ignore the negative sign and treat it as zero.
Ravi.
Ravi Varadhan, Ph.D.
Assistant Professor,
Division of Geriatric Medici
Hi Anita,
A bit of sample data would probably help here.
Have a look at ?dput for a handy way to supply some data.
Also a quick summary of exactly what you are trying to accomplish would be
useful. A very cursory reading of the program leaves one wondering why you are
creating all those variab
( sorry if this is a duplicate, I am not sure if hotmail is
dropping some of my posts. Thanks )
>
You obviously want to delegate inner loops to R packages that
execute as native, hopefully optimized, code.
Generally a google search that starts with "R CRAN" will help.
In this case it look
If by 35 (10%) you mean that 35 is the numerator, this is not such a good
idea. That's because it emphasizes something that is not a scientific
quantity. A scientific quantity is something that has a meaning outside the
current sample. The numerator is dependent on the denominator.
Regarding th
Hi,
I'm just starting out with Sweave, and I can't get a plot(linmod) to
display all four plots:
<< bild >>=
x1 <- runif(100)
x2 <- rexp(100)
y <- 3 + 4*x1 + 5*x2 + rnorm(100)
mod <- lm(y~x1+x2)
plot(mod)
@
Some Text
<>=
<>
@
This plots only the first image of the four-page plot.lm() result
I am working with the pmt function in the {mnormt} package, and i am getting
negative values returned. the following is an example of one of my outputs:
pmt(x = c(3.024960, -1.010898), mean = c(21.18844, 21.18844), S =
matrix(c(.319,.139,.139,0.319), 2, 2),df = 42)
# -6.585641e-18
Any help on wh
Hi,
I'm new. I tried to search out this answer but I suspect I was using the
wrong terms, or simply not understanding some of the answers. Anyway here is
my question:
I want to have a 2x2 panel figure with 4 line graphs all in the same scale.
Actually I have that. The thing I seem to be lacking
Hi,
Creating the X'y vector has been troublesome. I get the error: requires
numeric/complex matrix/vector arguments. Could you please look at my code and
tell me what I am doing wrong? I have several dummy variables among my
independent variables.
#Variable MHL16, or that corresponding to w
Hello All,
I am trying to learn about the GUI in R (with GTK+Glade+RGtk2) and in my
test I don't get sucess in to make
an callback to destroy the application...
When I try to define an function for "delet-event callback", I get the
error message:
(with mouse click in X window)
*Error in fun
This may not be a proper question to ask here, however I don't find a better
place to ask.
I am testing Ubuntu Natty 11.04. I build R with Blas/Lapack linked to intel MKL.
Everything works fine but when quitting R with q(), the R process won't quit, and the
system monitor shows its waiting cha
Hello,everybody. My name is Chuan Zun Liang. I come from Malaysia. I am just
a beginner for R. Kindly to ask favor about median filter. The problem I
facing as below:
> x<-matrix(sample(1:30,25),5,5)
> x
[,1] [,2] [,3] [,4] [,5]
[1,]78 30 29 13
[2,]46 1259
[3,
http://dix4life.leadhoster.com/molo.php
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
a
Dear expeRts,
I partially managed to obtain what I wanted by using latticeExtra. However, the
following questions remain:
1) why do not all x-axis labels appear? [compare bw and bw2]
2) Can I have the y-axis labels on the right margin/side of the plot? Changing
the "alternating" argument does not
You're mixing up two concepts here,
- splines
- bootstrap confidence intervals
Separating them may help cut the confusion.
First, to do a bootstrap confidence interval for a difference in predictions
in the linear regression case, do:
repeat 10^4 times
draw a bootstrap sample of the observa
?axis
Sent from my iPad
On Mar 26, 2011, at 18:21, Bulent Arikan wrote:
> Hi,
> I am working on some line charts and although I have a lot of resources, I
> cannot seem to find an answer to this question: how can I set the
> incrementation of values on the x-axis values so that I can see all th
Dear list,
I have been working with the MatrixModels package quite a bit this
week, and it is proving to be extremely valuable for my current work
(I am working with several factors with many levels, leading to a
sparse model matrix). However, as my knowledge of statistical theory
leaves much to b
If you can work with a different penalty check out the lrm function
from the rms package, which uses
penalized likelihood to fit proportional odds.
2011/3/24 Jheng-Jhong Wang :
> Dear R-users,
>
> I try to fit proportional odds ratio model "with LASSO" in
> ordinal regression.
> But I jus
(11/03/25 22:40), Nick Sabbe wrote:
> 2. Which model, I mean lasso or elastic net, should be selected? and
> why? Both models chose the same variables but different coefficient values.
> You may want to read 'the elements of statistical learning' to find some
> info on the advantages of ridge/lass
On Mar 27, 2011, at 3:22 AM, peter dalgaard wrote:
On Mar 27, 2011, at 08:25 , David Winsemius wrote:
On Mar 26, 2011, at 10:26 PM, fisken wrote:
I was wondering if it is possible to do the following in a smarter
way.
I want get the mean value across the columns of a matrix, but I want
Here is how to do the legend:
x <- cbind(rbind(1,2,3), 4)
layout(x, width = c(5,1))
layout.show(4)
plot(1:10, type = 'l')
plot(1:10, type = 'l')
plot(1:10, type = 'l')
# reset margins for creating the legend
oldMar <- par(mar = c(0,0,0,0))
plot.new()
legend('center'
, legend = 1:10
, lwd
I played around with this for awhile and did not get very far. I did
not see any arguments in summary.formula or its print methods to
reorder (happy to be corrected). Another approach I toyed with was to
create a custom function to pass to summary.formula() that would
itself create (something lik
Hello,
I am using Hmisc summary.formula, latex and Sweave to produce tables for
publication. Is it possible to change the formats for binary and continuous
variables? I would prefer to show 35 (10%) and 1.5 (1.2-1.8) rather than 10%
(35) and 1.2 / 1.5 / 1.8. Here is a simple example:
sex <-
On Mar 27, 2011, at 08:25 , David Winsemius wrote:
>
> On Mar 26, 2011, at 10:26 PM, fisken wrote:
>
>> I was wondering if it is possible to do the following in a smarter way.
>>
>> I want get the mean value across the columns of a matrix, but I want
_along_ the columns, I assume.
>> to do
63 matches
Mail list logo