Displaying 18 results from an estimated 18 matches similar to: "R-squared with and without constant"
2012 Mar 29
3
scalar assignment within a vector within function
Hello,
I'm trying to create a vector of r^2 values for using a function which I
will run in a "for" loop. Example:
per<-rnorm(100,.5,.2)^2
x<-rnorm(100,10,5)
y<-rnorm(100,20,5)
fr<-data.frame(x,y,per)
test<-rep(0,9)
plotter<-function(i){
temp.i<-fr[fr$per <=(i*.10),]
with(temp.i, plot(x, y, main=(i*.10),))
mod<-lm(y~x-1,data=temp.i)
2011 Dec 08
2
a weird "cut" question
Dear R People:
I have the following data:
> ail.df[,1]
[1] 47677 47602 47678 47905 47909 47906 47605 47673 47607
> cut(ail.df[,1],breaks=3)
[1] (4.76e+04,4.77e+04] (4.76e+04,4.77e+04] (4.76e+04,4.77e+04]
[4] (4.78e+04,4.79e+04] (4.78e+04,4.79e+04] (4.78e+04,4.79e+04]
[7] (4.76e+04,4.77e+04] (4.76e+04,4.77e+04] (4.76e+04,4.77e+04]
Levels: (4.76e+04,4.77e+04] (4.77e+04,4.78e+04]
2009 Mar 06
1
R and vim (gvim) on ubuntu
Dear all -
I do fret this to be a revealing beginner question - fortunately, this
mailing list have been good to me in the paste .-)
I am looking for a good R editor/environment in ubuntu. To that end, I have
decided to dive into gvim as the modality offered here seems to make sense
for editing.
I want to use Johannes Ranke's vim r-plugin, but I can't make it work.
I have the plugin
2013 Nov 08
1
Different output from lm() and lmPerm lmp() if categorical variables are included in the analysis
I've found a problem when using
categorical variables in lmp() from package lmPerm
According to help(lmp): "This function will behave identically to lm()
if the following parameters are set: perm="", seq=TRUE,
center=FALSE.")
But not in the case of including categorical variables:
require(lmPerm)
set.seed(42)
testx1 <- rnorm(100,10,5)
testx2 <-
2013 Feb 21
2
ggplot2, geomtile fill assignment
Dear R help,
I have some readings in three dimensions (x, y, z) and an amplitude for
each. I'd like to visualize the data using ggplot, using tile plots, as I
have some additional point data I would like to eventually overlay on the
tile plots.
I would like to subset the data by sections, slices if you will, in the z
dimension, and plot the data for that slice.
I can do all of this, but am
2002 Nov 07
2
Qualitative factors
Hi,
I have some doubt about how qualitative factors are coded in R. For
instance, I consider a response y, a quantitative factor x and a qualitative
factor m at 3 levels, generated as follow :
y_c(6,4,2.3,5,3.5,4,1.,8.5,4.3,5.6,2.3,4.1,2.5,8.4,7.4)
x_c(3,1,3,1,2,1,4,5,1,3,4,2,5,4,3)
m_gl(3,5)
lm(y~x+m)
Coefficients:
(Intercept) x m2 m3
3.96364 0.09818
2012 Mar 08
2
hierarchical clustering of large dataset
Hello All,
i've a set of observations that is in the form :
a, b, c, d, e, f
67.12, 4.28, 1.7825, 30, 3, 16001
67.12, 4.28, 1.7825, 30, 3, 16001
66.57, 4.28, 1.355, 30, 3, 16001
66.2, 4.28, 1.3459, 13, 3, 16001
66.2, 4.28, 1.3459, 13, 3, 16001
66.2, 4.28, 1.3459, 13, 3, 16001
66.2,
2011 Jan 17
1
Problem about for loop
Hi everyones, my function like;
e <- rnorm(n=50, mean=0, sd=sqrt(0.5625))
x0 <- c(rep(1,50))
x1 <- rnorm(n=50,mean=2,sd=1)
x2 <- rnorm(n=50,mean=2,sd=1)
x3 <- rnorm(n=50,mean=2,sd=1)
x4 <- rnorm(n=50,mean=2,sd=1)
y <- 1+ 2*x1+4*x2+3*x3+2*x4+e
x2[1] = 10 #influential observarion
y[1] = 10 #influential observarion
data.x <- matrix(c(x0,x1,x2,x3,x4),ncol=5)
data.y
2007 Nov 29
1
Anova(car) SS digits
Hi,
When I use Anova(car) to produce type III SS, 'Sum Sq' is reported in
integers:
> Anova(bot.lm3, type ="III")
Anova Table (Type III tests)
Response: bottemp
Sum Sq Df F value Pr(>F)
(Intercept) 45295 1 29436.4440 < 2e-16
fungroup 3 2 0.8259 0.44006
numsp.fun 11 2
2000 Jun 16
0
glm under R versions 1.0.1 and 1.1.0
I have fitted a number of models with receipt of social assictance
(toim1) during a year (values 0 or 1) with a number of covariates.
The data include sampling weights which I use in the models. Using the
exact same data, glm() under 1.0.1 and 1.1.0 give different results in
many (but not all) of the models. I have re-installed 1.0.1 to check
this and I found now mention in the NEWS file that
2009 Feb 23
1
Follow-up to Reply: Overdispersion with binomial distribution
THANKS so very much for your help (previous and future!). I have a two
follow-up questions.
1) You say that dispersion = 1 by definition ....dispersion changes from 1
to 13.5 when I go from binomial to quasibinomial....does this suggest that
I should use the binomial? i.e., is the dispersion factor more important
that the
2) Is there a cutoff for too much overdispersion - mine seems to be
2006 Jul 15
0
How to Interpret Results of Regression in R
-----------------------------------------------------------------------------------------------------
Howdy, Gurus
I am appying R package for regression analysis as followings.
A dependent variable is jhnet that means ratio of dividing internal trip
with all trips in a traffic zone. There are many indepentent variables
including factor or dummy varibles such as parkfee, ohouse, Devt2,
corridor1.
2006 Nov 29
2
filled.contour and NA's
Hi,
I'm trying to do a filled.contour plot where some points are labelled as
NA. How do I could plot this kind of graphics, so NA points are coloured
black, keeping the levels of remaining points. NA's values represent
land points (meaningless), and what I want to plot is the levels of a
variable over the sea.
x<-seq(length=21, from=-10, by=.25)
y<-seq(length=8, from=36,
2011 Mar 20
2
Why unique(sample) decreases the performance ?
Hi,
I' am interested in differences between sample's result when samples consist
of full elements and consist of only distinct elements. When sample consist
of full elements it take about 120 sec., but when consist of only distinct
elements it take about 4.5 or 5 times more sec. I expected that opposite of
this result, because unique(sample) has less elements than full sample. Code
as
2006 Dec 20
4
undefined method `fullname' for #<User:0x357e380>, BUT works on first view?
Hi all,
Please excuse the long post, but I wanted to make sure you have all the
information....
I have a NewsModel that looks like this:
class News < ActiveRecord::Base
belongs_to :user
validates_associated :user
validates_length_of :title, :description, :minimum => 5, :allow_nil
=> false
acts_as_commentable
acts_as_taggable
def self.find_recent
News.find(:all,
2011 Sep 30
1
Hi
Hi,
There is a question that I am confused.
I have a set of data like this:
hsa-miR-205--GATA3 0.797882767 1.08E-13
hsa-miR-205--ITGB4 0.750217593 1.85E-11
hsa-miR-187--PGF 0.797604155 3.24E-11
hsa-miR-205--SERPINB5 0.744124886 3.28E-11
hsa-miR-205--PBX1 0.734487224 7.89E-11
hsa-miR-205--MCC 0.72499934 1.80E-10
hsa-miR-205--WNT5B 0.717705259 3.33E-10
hsa-miR-200c--PKN2 0.721746815
2003 Jun 26
1
Correct contrast for unreplicated 2K factorial design
Hi all,
I have been trying to reproduce an analysis from Douglas Montgomery?s
book on design and analysis of experiments. Table 6.10 of example 6.2 on
page 246, gives a table as follows:
> NPK <- expand.grid(A=mp,B=mp,C=mp,D=mp)
> Rate <- c(45,71,48,65,68,60,80,65,43,100,45,104,75,86,70,96)
> filtration <- cbind(NPK,Rate)
> filtration
A B C D Rate
1 - - - - 45
2
2010 Mar 13
3
format: from list to data frame
Dear users,
Is anyone out there on a Saturday to answer this easy question?
I have the "yo" object data in a "list" format:
> str(yo)
num [1:259, 1:173] 16.3 NA NA NA NA ...
- attr(*, "dimnames")=List of 2
..$ x: chr [1:259] "367319" "367329" "367309" "367339" ...
..$ y: chr [1:173] "780175"