Displaying 20 results from an estimated 1000 matches similar to: "How to compare linear models with intercept and those without intercept using minimizing adjs R^2 strategy"
2007 May 17
4
R2 always increases as variables are added?
Hi, everybody,
3 questions about R-square:
---------(1)----------- Does R2 always increase as variables are added?
---------(2)----------- Does R2 always greater than 1?
---------(3)----------- How is R2 in summary(lm(y~x-1))$r.squared
calculated? It is different from (r.square=sum((y.hat-mean
(y))^2)/sum((y-mean(y))^2))
I will illustrate these problems by the following codes:
2008 Jan 24
3
features boxplot
Hallo,
I just made a boxplot with the following command:
boxplot(vsnrg$M~col(vsnrg$M))
When I now look at the plot. On the x-axis I just find numbers 1-6
because I have 6 datasets plotted. Now I want to add there the
corresponding names which can be found in colnames(qrg). How can I
realize this the online help does not help me.
Thanks Corinna
2006 Nov 17
2
Getting R and .Rdata together again
Somehow, I've managed to have my .Rdata files become `disassociated'
from the R program. I am running Windows XP Pro. I have re-installed R
2.4 in an attempt to have it re-associate itself with .Rdata files, but
to no avail. .Rdata files are now associated with a file compression
program or alternatively with Rgui.exe. .Rdata files are represented by
the blue R, but double-clicking on
2006 Oct 20
2
Forest plot
Has anyone developed a function to generate a forest plot, the one used
a lot in meta-analysis?
Joseph F. Lucke, PhD
Biostatistician
Center for Clinical Research and Evidence-based Medicine
Department of Pediatrics
School of Medicine
University of Texas Health Science Center at Houston
Voice: 713-500-5651
Email: Joseph.F.Lucke@uth.tmc.edu
Postal Mail: PO Box 20708, Houston, TX 77225-0708
2009 May 11
3
Looking for a quick way to combine rows in a matrix
I'm working with genotype data in a frequency table:
> a=matrix(1:16, nrow=4)
> rownames(a)=c("AA","AT","TA","TT")
> a
[,1] [,2] [,3] [,4]
AA 1 5 9 13
AT 2 6 10 14
TA 3 7 11 15
TT 4 8 12 16
'AT' and 'TA' are essentially the same, and I'd like to combine (add) the rows to reflect
2010 Apr 17
2
Interacting with dendrogram plots, locator() or click()
I would like to explore dendrogam plots interactively. For example, click on a node and return information about all of the children of that node.
Is there a high level wrapper for locator() or click() that will return the nearest dendrogram node on a plot?
If not, is there a way to obtain the [x,y] coordinates of all the nodes on a plot?
Thanks,
David
David J. States, M.D., Ph.D.
Professor
2006 Dec 29
1
Why giving negative density when doing kernel density estimate?
Why? And how to solve it? The code and result are following,
> data=rnorm(50)
>
> kde=density(data,n=20,from=-1,to=10)
>
> kde$x;kde$y
[1] -1.0000000 -0.4210526 0.1578947 0.7368421 1.3157895 1.8947368
[7] 2.4736842 3.0526316 3.6315789 4.2105263 4.7894737 5.3684211
[13] 5.9473684 6.5263158 7.1052632 7.6842105 8.2631579 8.8421053
[19] 9.4210526 10.0000000
[1]
2007 May 12
0
There might be something wrong with cv.lm(DAAG)
Hi, everyone
When I was using cv.lm(DAAG) , I found there might be something wrong with
it. The problem is that we can't use it to deal with a linear model with
more than one predictor variable. But the usage documentation
hasn't informed us about this.
You can find it by excuting the following code:
xx=matrix(rnorm(20*3),ncol=3)
bb=c(1,2,0)
yy=xx%*%bb+rnorm(20,0,10)
2007 May 21
0
How to conduct a hypothesis test : Ho:|E(X)|=|E(Y)|<->H1:otherwise NOT R question
Dear R-list,
I am sorry for my shortage of stat knowlege. I want know how to conduct a
hypothesis test : Ho:|E(X)|=|E(Y)|<->H1:otherwise.
Actually, in my study, X and Y is two observations of bias,
where bias=u^hat-u, u is a parameter I concerned. Given X=(u^hat_xi - u) and
Y=(u^hat_yi - u), I want to know which bias is smaller, or the absolute
expection of which is smaller. Due to limit
2007 May 21
0
Is this a bug in cv.lm(DAAG) ?
Dear R-list,
I'm not sure what I've found about a function in DAAG package is a bug.
When I was using cv.lm(DAAG) , I found there might be something wrong with
it. The problem is that we can't use it to deal with a linear model with
more than one predictor variable. But the usage documentation
hasn't informed us about this.
The code illustrates my discovery:
> library(DAAG)
2011 Feb 14
1
conditional value assignment
Dear R-Help,
I am trying to compute a new variable, let's call it "target cannon orientation (tco)" based conditionally on old variables, "TargetColor," "CannonOriB," and "CannonOriR." For every case in the data set, if TargetColor is "B" then I want tco to equal the value for that case of CannonOirB, else CannonOriR. I've tried writing
2007 May 11
1
model seleciton by leave-one-out cross-validation
Hi, all
When I am using mle.cv(wle), I find a interesting problem: I can't do
leave-one-out cross-validation with mle.cv(wle). I will illustrate the
problem as following:
> xx=matrix(rnorm(20*3),ncol=3)
> bb=c(1,2,0)
> yy=xx%*%bb+rnorm(20,0,0.001)+0
> summary(mle.cv(yy~xx,split=nrow(xx)-1,monte.carlo=2*nrow(xx),verbose=T),
num.max=1)[[1]]
mle.cv: dimension of the split subsample
2007 May 25
1
normality tests [Broadcast]
The normality of the residuals is important in the inference procedures for the classical linear regression model, and normality is very important in correlation analysis (second moment)...
Washington S. Silva
> Thank you all for your replies.... they have been more useful... well
> in my case I have chosen to do some parametric tests (more precisely
> correlation and linear regressions
2011 Apr 07
2
replace an expression with its value, or read macros
I know my subject line seems odd, but I want to replace an expression—such as a variable—with its value. For example, I want to paste() some strings together, assign the result to a variable s, then use the value of s as a variable to hold another value. Something like this:
import_subjects <- function (start, iterations) {
for (i in 1:iterations) { # iterate from start to end
s <-
2010 May 19
4
[LLVMdev] Support for per-loop pragma
Hi Chris,
Thanks. I will see what I can do for this.
Junjie
On Wed, May 19, 2010 at 3:45 PM, Chris Lattner <clattner at apple.com> wrote:
>
> On May 19, 2010, at 2:38 PM, Junjie Gu wrote:
>
>> Many compilers support per-loop pragma, such as loop unrolling (ie
>> #pragma unroll=2). Is there any LLVM project/effort going on
>> in this area ? What is the expected
2012 Sep 25
3
Plotting of regsubsets adjr2 values not correct
Hi,
I want to make model selection with regsubsets. My code is:
a<-regsubsets(Gesamt ~ CommunistSocialist + CountrySize + GNI + Lifeexp +
Schoolyears + ExpMilitary + Mortality +
PopPoverty + PopTotal + ExpEdu + ExpHealth, data=olympiadaten, nbest=2)
summary(a)
plot(a,scale="adjr2")
(output attached)
The problem is now, that I want to fit the best model again "manually"
2010 Jun 02
0
[LLVMdev] Support for per-loop pragma
I'd like to add a pragma support in llvm. I am thinking about using a
llvm intrinsic to represent each pragma, such as
llvm.pragma (metadata, ...)
where metadata describes a pragma. So if an application has:
#pragma p1 ..
#pragma p2...
for (...)
The llvm IR would be
llvm.pragma (metadata..) // for p1
llvm.pragma (metadata..) // for p2
llvm IR for "for
2010 Jun 02
3
[LLVMdev] Support for per-loop pragma
On Tue, Jun 1, 2010 at 5:42 PM, Junjie Gu <jgu222 at gmail.com> wrote:
> Any suggestions/ideas ?
IIUC, Chris suggested something like following ...
header:
br i1 %x, label %then, %label endif
then:
...
br i1 %y, label %loop_exit, label %header, !loop_pragma !1
endif:
...
br i1 %z, label %loop_exit, label %header, !loop_pragma !2
loop_exit:
ret i32 1
Where !1 and !2 are the
2005 Sep 27
4
regsubsets selection criterion
Hello,
I am using the 'regsubsets' function
(from leaps package)
to get the best linear models
to explain 1 variable
from 1 to 5 explanatory variables
(exhaustive search).
Is there anyone who can tell me
on which criterion is based
the 'regsubsets' function ?
Thank you.
samuel
Samuel BERTRAND
Doctorant
Laboratoire de Biomecanique
LBM - ENSAM - CNRS UMR 8005
2010 May 19
2
[LLVMdev] Support for per-loop pragma
Many compilers support per-loop pragma, such as loop unrolling (ie
#pragma unroll=2). Is there any LLVM project/effort going on
in this area ? What is the expected way for implementing per-loop
pragma, or general pragma ? Suggestions/comments ?
Thanks
Junjie