Displaying 20 results from an estimated 110 matches similar to: "Plotting of regsubsets adjr2 values not correct"
2012 Sep 25
2
Regsubsets model selection
Hi,
I have 12 independent variables and one dependent variable. Now I want to
select the best adj. R squared model by using the regsubsets command, so I
code:
> plot(regsubsets(Gesamt ~ CommunistSocialist + CountrySize + GNI + Lifeexp
+ Schoolyears + ExpMilitary + Mortality +
+ PopPoverty + PopTotal + ExpEdu + ExpHealth, data=olympiadaten, nbest=1,
nvmax=12), scale='adjr2')
Then I
2012 Sep 24
2
add lowess predicted line to scatter plot
Hi,
I have a scatter plot of the variables GNI and Lifeexp (Gross National
Income and Life Expectancy, both metric). So I plotted them and I want to
add a regression line and a lowess line. I use lowess and not loess because
I have missing values. My code:
plot(GNI,Lifeexp)
abline(lm(Lifeexp~GNI), col="red")
y.loess<-loess(Lifeexp~GNI,na.
action = na.exclude)
2011 Jul 20
3
Grouping columns
*Hi @ all,
I have a question concerning the possibilty of grouping the columns of a
matrix.
R groups the columns alphabetically.
What can I do to group the columns in my specifications?
The script is the following:*
> #R-Skript: Anzahl xyz
>
> #Quelldatei einlesen
> b<-read.csv2("Z:/int/xyz.csv", header=TRUE)
>
> #Teilmengen f?r die Einzeljahre generieren
>
2007 May 21
4
How to compare linear models with intercept and those without intercept using minimizing adjs R^2 strategy
Dear R-list,
I apologize for my many emails but I think I know how to desctribe my
problem differently and more clearly.
My question is how to compare linear models with intercept and those without
intercept using maximizing adjusted R^2 strategy.
Now I do it like the following:
> library(leaps)
> n=20
> x=matrix(rnorm(n*3),ncol=3)
> b=c(1,2,0)
> intercept=1
>
2009 Aug 18
2
(no subject)
Dear all,
I have a problem with the function read.xls from the gdata package, error message see below. Two examples:
First, I try to read my data, which does not work;
Secondly, I tried the example code/data with the Iris data, which worked
Any idea?
Thanks,
Lars
> path<-"I:/subProjects/bh/HPGD/"
>
> setwd(path)
>
> xls <- "Platten_Liste_090421.xls"
2002 Feb 12
1
Best Subsets regression
Hi,
I have found a minor problem with leaps(). In 1.3.1 under Windows 2000 I
seem to only be able to obtain values for one statistic at a time. That is
choosing
method=c("Cp","adjr2","r2")
just gives Cp values.
To mimic the output of Minitab's
MTB > BReg 'Fertility' 'Agriculture'-'Infant.Mortality' ;
SUBC> NVars 1 5;
SUBC>
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
2009 Feb 25
1
leaps question
Colleagues,
please help me with the simple question.
How can I find R2 and p while doing best subsets regression? Also how
can I see B and p for coefficients?
Maybe you can advice me detailed manual, because in manual for the
package this is not described.
Thank you
2002 Sep 11
1
Problem with leaps (long)
I am generating a bunch of examples for my students and when I type
R BATCH demo10.R
(file demo10.R reproduced below) I get an error:
------------- Error message ------
> plot(mods$size,mods$Cp,
+ main="Cp versus talla modelos",
+ xlab=expression(p),
+ ylab=expression(C[p]))
Error in plot.window(xlim, ylim, log, asp, ...) :
need finite ylim values
In
2003 Sep 09
1
ANOVA
I have Data like this:
Tone OQtil4 OQ0 GOtil4 GO0 SKrhsJ SK0 RCrhsJ
RC0
1 HsLG -9.1347877 -2.97 -7.409590 -6.40 9.389357 20.60 10.688854
24.40
2 HsLG -7.9270569 -2.03 -7.861541 -6.90 10.165324 26.40 10.640183
23.10
3 HsLG -7.0394106 -1.26 -7.509566 -6.53 12.033194 30.87 9.401959
20.37
4 HsLG -6.8625610 -1.03 -7.645118 -6.68 10.372605 24.22 9.378803
17.82
5
2010 Feb 12
1
all possible subsets, with AIC
Hello,
I have a question about doing ALL possible subsets regression
with a general linear model. My goal is to produce cumulative Akaike
weights for each of 7 predictor variables-to obtain this I need R to:
1.
Show me ALL possible subsets, not just the best possible subsets
2. Give
me an AIC value for each model (instead of a BIC value).
I have tried to
do this in library(RcmdrPlugin.HH),
2006 Dec 11
1
organizing stats from a list of models
Hi there,
I have a list of models (about 600 glm models) and I included the prefix "mod_" on their name. Now I would like retrieve the list from the R environment and save their AICs (and other info) on a table. I´m trying something like:
-------------------------
y<-runif(20,min=0,max=1)
x1<-runif(20,min=0,max=1)
x2<-runif(20,min=0,max=1)
mymod_1
2007 Oct 03
0
leaps: regsubsets, formula including interactions
Hi R-list members,
Could somebody explain to me the meaning of the '.' in the formula
SumTL~. below? I could not find it in the help pages. I'm guessing it is
substituted by v1+v2+v3+.. for all independent variables vi.
Furthermore, I would like to add interaction effects to the model,
is this also possible with the '.'?
> library(leaps)
>
2008 Aug 13
2
which alternative tests instead of AIC/BIC for choosing models
Dear R Users,
I am looking for an alternative to AIC or BIC to choose model parameters.
This is somewhat of a general statistics question, but I ask it in this
forum as I am looking for a R solution.
Suppose I have one dependent variable, y, and two independent variables,
x1 an x2.
I can perform three regressions:
reg1: y~x1
reg2: y~x2
reg3: y~x1+x2
The AIC of reg1 is 2000, reg2 is
2004 Apr 05
0
Selecting Best Regression Equation : leaps() in R and stepwise() in S+
Dear all,
First of all - thanks to the R-users who replied my previous mail
"Selecting Best Regression Equation". However, seems i've got some other
problems now -
My data in c:\leafbrn.txt file is-
--------------------------------------
i x1 x2 x3 y
1 3.05 1.45 5.67 0.34
2 4.22 1.35 4.86 0.11
3 3.34 0.26 4.19 0.38
4 3.77 0.23 4.42 0.68
5 3.52 1.10 3.17 0.18
6 3.54 0.76 2.76
2007 Aug 08
1
Regsubsets statistics
Dear R-help,
I have used the regsubsets function from the leaps package to do subset
selection of a logistic regression model with 6 independent variables and
all possible ^2 interactions. As I want to get information about the
statistics behind the selection output, I?ve intensively searched the
mailing list to find answers to following questions:
1. What should I do to get the statistics
2007 Oct 02
0
Variable selection in R
Disclaimer : Short of having local statistical expertise at hand, I'm using
this list because I use R for variable selection in the context of linear
multiple regression but the questions I have relate more to basic statistics
than to R per se. Please redirect me to another appropriate list if such a
list exists.
I have the very common problem of identifying which (subset of) variables
are
2002 Jul 01
0
recursive scp fails on ReliantUNIX 5.43 (using OpenSSH 3.4p1)
Hi,
I have tried to make a recursive scp from a ReliantUNIX machine to an other UNIX machine and got an infinite loop on the source machine.
A "normal" scp works well.
Also strange is, that the first two letters of the directory respectively file name are missing in the output below.
The destination machine produces a directory structure with growing subdirectory names.
Below you can
2006 Jun 17
2
problem with select_date
In my form I have these items:
<%= select_year Date.today,
:start_year => Schoolyear.get_startdate.year,
:end_year => Schoolyear.get_enddate.year %>
<%= select_month Date.today.month %>
No matter what I do, in my controller I can''t seem to access the
selected year and
month.
I have tried params[:month].to_s and also
2009 Sep 28
4
Running an ANOVA with a BY
I have a simple 1 way anova coded like
summary(ANOVA1way <- aov(Value ~ WellID, data = welldata))
How can I use the BY function to do this ANOVA for each group using another
variable in the dataset?? I tried coding it like this, but it doesn't seem
to work.
summary(ANOVA1way <- by(welldata, Analyte, function(x) aov(Value ~ WellID,
data = welldata)))
In SAS I would code it like this: