Displaying 20 results from an estimated 5667 matches for "squar".
Did you mean:
squat
2011 Jun 28
2
How do I output all the R-squares of an SUR? summary(fitSUR$eq[[1:4]])$r.squared does not work
Greetings R Users,
I have a system of equations for which I would like to output all the
R-squares. Assume there are four equations in my system, the only way I
found to output all the R-squares is by calling them out one by one as this:
summary(fitSUR$eq[[1]])$r.squared
summary(fitSUR$eq[[2]])$r.squared
summary(fitSUR$eq[[3]])$r.squared
summary(fitSUR$eq[[4]])$r.squared
But isn't there...
2009 Feb 04
1
igraph: error when setting size and shape of vertices
When the shape of all vertices is set to "square" and the size of the vertices is also set, one get following error (commands attached):
Error in l[[which.min(sapply(l, function(p) (p[1] - x0)^2 + (p[2] - y0)^2))]] :
attempt to select less than one element
Is there a way to solve this problem?
Robbie
## Load the igraph package
l...
2012 Aug 30
2
self-defined distance function to be computed on matrix
...computational
expensive, so I'd love to ask if anyone may have suggestions on how to
implement it more efficiently. Thanks in advance.
For example, there are three vectors in the matrix, which are
A B C
1 0 1
-1 1 1
-1 -1 1
1 0 -1
Distance(AB) = (-1X1+(-1)X(-1))/de(AB) , and
de(AB) = sqrt(square(-1)+square(-1)) X sqrt(square(1)+square(-1))
Distance(BC) = (1X1+(-1)X1)/de(BC) ,and
de(BC) = sqrt(square(1)+square(-1)) X sqrt(square(1)+square(1))
Distance(AC) = (1X1+(-1)X1+(-1)X1+1X(-1))/de(AC), and
de(BC) = sqrt(square(1)+square(-1)+square(-1)+square(1)) X
sqrt(square(1)+square(1)+square(...
2012 Dec 03
4
Chi-squared test when observed near expected
Dear UseRs,
I'm running a chi-squared test where the expected matrix is the same as the
observed, after rounding. R reports a X-squared of zero with a p value of
one. I can justify this because any other result will deviate at least as
much from the expected because what we observe is the expected, after
rounding. But the formula...
2004 Mar 19
5
asp=1 and aspect ratio
Hi everyone
I want a square scatterplot with abline(0,1) going exactly through the
SW and NE corners. By "square" I mean that the plotting region is
exactly square, and that the axis limits are identical.
x <- 1:20
y <- x+rep(c(-1,1),10)
lims <- range(c(x,y))
None of the following do this:
plot(x,y) ;...
2011 Sep 08
2
Extract r.squared using cbind in lm
Hello,
I am using cbind in a lm-model. For standard lm-models
the r.squared can be easily extracted with summary(model)$r.squared,
but that is not working in in the case with cbind.
Here an example to illustrate the problem:
a <- c(1,3,5,2,5,3,1,6,7,2,3,2,6)
b <- c(12,15,18,10,18,22,9,7,9,23,12,17,13)
c <- c(22,26,32,33,32,28,29,37,34,29,30,32,29)
data <...
2006 Aug 25
1
R.squared in Weighted Least Square using the Lm Function
Hello all,
I am using the function lm to do my weighted least
square regression.
model<-lm(Y~X1+X2, weight=w)
What I am confused is the r.squared.
It does not seem that the r.squared for the weighted
case is an ordinary 1-RSS/TSS.
What is that precisely?
Is the r.squared measure comparable to that obtained
by the ordinary least square?
<I also notice that...
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 illustrat...
2004 Jun 06
3
Average R-squared of model1 to model n
...interpretating R-suqared.
The actual outputs for a test dataset is X=(x1,x2, ..., xn).
model 1 predicted the outputs as Y1=(y11,y12,..., y1n)
model n predicted the outputs as Y2=(y21,y22,..., y2n)
...
model m predicted the outputs as Ym=(ym1,ym2,..., ymn)
Now we have two ways to calculate R squared to evaluate the average performance of committee model.
(a) Calculate R squared between (X, Y1), (X, Y2), ..., (X,Ym), and then averaging the R squared
(b) Calculate average Y=(Y1+Y2, + ... Ym)/m, and then calculate the R squared between (X, Y).
We found it seemed that R squared calculated i...
2010 Jan 22
4
Extract R-squared from summary of lm
Dear all,
I cannot find to explicitly get the R-squared or adjusted R-squared from
summary(lm())
Thanks a lot!
[[alternative HTML version deleted]]
2011 Jul 21
4
squared "pie chart" - is there such a thing?
...e.g., %), and three components of the total, e.g.,
mytotal=data.frame(x=50,y=30,z=20), - one could build a pie chart with
3 sectors representing x, y, and z according to their proportions in
the total.
I am wondering if it's possible to build something very similar, but
not on a circle but in a square - such that the total area of the
square is the sum of the components and the components (x, y, and z)
are represented on a square as shapes with right angles (squares,
rectangles, L-shapes, etc.). I realize there are many possible
positions and shapes - even for 3 components. But I don't real...
2013 Feb 16
2
Interpret R-squared and cor in R
Hi I am trying to find the relationship between two variables.
First I fitted a linear model between two variables and I found the
following results:
Residual standard error: 0.03253 on 2498 degrees of freedom
Multiple R-squared: 0.5551, Adjusted R-squared: 0.5549
F-statistic: 3116 on 1 and 2498 DF, p-value: < 2.2e-16
Then I used the cor function to see the correlation between two variable
I get the following result
-0.7450344
How can we interpret the result based on R-squared and correlation ? From
the p-value we...
2010 Dec 29
1
Problem applying Chi-square in R and Cochran's Recommendations
Sir,
I have a problem here while applying chisquare test to the following Data (
below the subject of this mail) ...when I wanted to test the significance
using three different free statistical packages, here R, EpiInfo and
OpenEpi.
*Only OpenEpi accepts the test based on Cochran's Recommendations. *
R says " chi squared approximation may...
2011 Oct 11
3
Chi-Square test and survey results
...52
Region_12 1823 312
Region_13 80 9
Region_14 774 121
Region_15 561 24
Region_16 834 134
How well does the survey represent the employee population?
Chi-square test says, not very well:
> chisq.test(ByRegion)
Pearson's Chi-squared test
data: ByRegion
X-squared = 163.6869, df = 15, p-value < 2.2e-16
By striking three under-represented regions (3,6, and 15), we get
a more reasonable, although still not convincing, result:
> chis...
2008 Nov 10
3
in R when I get negative adjusted R^2 using "lm", what might be the problem?
This is a linear regression of Y onto factors...
If I take log of Y, and regress onto the factors, I got:
Multiple R-squared: 0.4023, Adjusted R-squared: 0.2731
If I don't take log of Y, and directly regress Y onto the factors, I got:
Multiple R-squared: 0.1807, Adjusted R-squared: -0.001112
Is this negative adjusted R^2 a problem?
What observation can I make here and what might be the problem?
Thanks!
2013 Jul 29
1
[LLVMdev] llvm-g++ 4.6.4 unable to compile simple shared library on Ubuntu 12.04 x86_64
...3.0-3 C
front end for LLVM C/C++ compiler
ii llvm-runtime 2.9-7
Low-Level Virtual Machine (LLVM), bytecode interpreter
I have a very simple example that appears to illustrate this problem
/******** squared.h BEGIN *****/
int squared(int val);
/********* END *****/
/******* squared.c BEGIN ****/
int squared(int val) {
return val*val;
}
/********* END ****/
/**** main.c BEGIN *****/
#include <stdio.h>
int
main(int argc,char *argv[] ) {
int i = 0;
for( i = 0; i...
2003 Apr 22
4
fisher exact vs. simulated chi-square
Dear All,
I have a problem understanding the difference between the outcome of a
fisher exact test and a chi-square test (with simulated p.value).
For some sample data (see below), fisher reports p=.02337. The normal
chi-square test complains about "approximation may be incorrect",
because there is a column with cells with very small values. I
therefore tried the chi-square with simulated p-values, b...
2004 Jul 22
1
Bug: wrong R-squared in lm formula w/o intercept (PR#7127)
Full_Name: Adriano Azevedo Filho
Version: 1.9.1
OS: Windows, Linux
Submission from: (NULL) (200.171.246.212)
R-squared and Adjusted R-squared appear to be wrong when
the formula in lm() is specified without intercept. Problem
present in both Windows and Linux 1.9.1 version. Also
in the 1.8.1 version for Windows (other versions not
checked).
Possible example which reproduces the problem:
x<-1:10
y<-c(2,4,3...
2006 Jan 24
6
R vs. Excel (R-squared)
Hello All-
I found an inconsistency between the R-squared reported in Excel vs.
that in R, and I am wondering which (if any) may be correct and if
this is a known issue. While it certainly wouldn't surprise me if
Excel is just flat out wrong, I just want to make sure since the R-
squared reported in R seems surprisingly high. Please let me...
2003 Nov 03
2
Odd r-squared
Hi,
I would consider the calculation of r-squared in the following to be a
bug, but then, I've been wrong before. It seems that R looks to see if the
model contains an intercept term, and if it does not, computes r-squared in
a way I don't understand. To my mind, the following are two alternative
parametrizations of the same model, and...