Displaying 20 results from an estimated 1000 matches similar to: "Question re matplot"
2020 Oct 02
3
Lahman Baseball Data Using R DBI Package
I?m trying to pull data from one table (batting) in the Lahman Baseball database. Notice X2B for doubles and X3B for triples ? fourth and fifth from the right.
The dbGetQuery function runs fine when I leave there two out but I get error messages (in red) when I include 2B/3B or X2B/X3B.
Can anyone give me some direction?
Thanks,
Philip Heinrich
2020 Oct 03
1
Lahman Baseball Data Using R DBI Package
The double quotes are required by SQL if a name is not of the form
letter-followed-by-any-number-of-letters-or-numbers or if the name is a SQL
keyword like 'where' or 'select'. If you are doing this from a function,
you may as well quote all the names.
-Bill
On Fri, Oct 2, 2020 at 6:18 PM Philip <herd_dog at cox.net> wrote:
> The \?2B\? worked. Have no idea why. Can
2020 Oct 08
0
Lahman Baseball Data Using R DBI Package
Hi Philip,
You've probably realized by now that R doesn't like column names that
start with a number. If you try to access an R-dataframe column named
2B or 3B with the familiar "$" notation, you'll get an error:
> library(DBI)
> library(RSQLite)
> con2 <- dbConnect(SQLite(), "~/R_Dir/lahmansbaseballdb.sqlite")
> Hack12Batting <-
2020 Oct 08
1
Lahman Baseball Data Using R DBI Package
This is really a feature of SQL, not R. SQL requires that you double quote
column names that start with numbers, include spaces, etc., or that are SQL
key words. E.g.,
> d <- data.frame(Order=c("sit","stay","heel"),
Where=c("here","there","there"), From=c("me","me","you"))
>
2006 Apr 23
1
Question about bicreg
Dear Adrian and Ian (and r-helpers),
I encountered a curious result in developing an example using the bicreg
function in the BMA package: I noticed that pairs of models with equal R^2
and equal numbers of predictors had nevertheless different BIC values.
Looking at the bicreg function, the definition of BIC appears to be the
usual one, or close to it [bic <- n * log(1 - r2/100) + (size - 1) *
2006 Sep 29
3
What is wrong with this input
I can't seem to figure out why I'm getting this error. The output is
copied right off the screen. Notice how in some cases the back slash is
missing. In other cases, it can't read a file that I know is there.
Thanks in advance
> library(foreign)
> hrout <- read.spss("c:\\hrab200.sav")
Error in read.spss("c:\\hrab200.sav") : unable to open file
2004 Jun 11
4
Regression query
Hi
I have a set of data with both quantitative and categorical predictors.
After scaling of response variable, i looked for multicollinearity (VIF
values)
among the predictors and removed the predictors who were hinding some of the
other significant
predictors. I'm curious to know whether the predictors (who are not
significant)
while doing simple 'lm' will be involved in
2004 Jun 11
1
Regression query : steps for model building
Hi
I have a set of data with both quantitative and categorical predictors.
After scaling of response variable, i looked for multicollinearity (VIF
values) among the predictors and removed the predictors who were hinding
some of the
other significant predictors. I'm curious to know whether the predictors
(who are not significant) while doing simple 'lm' will be involved in
2009 Apr 02
1
calculating drop1 R^2s
This is probably simple, but I just can't see it...
I want to calculate the R^2s for a series of linear models where each
term is dropped in turn. I can get the
RSS from drop1(), and the r.squared from summary() for a given model,
but don't know how to use the
result of drop1() to get the r.squared for each model with one term dropped.
Working example:
library(vcd) # for
2007 Oct 23
2
A very simple question
Hi all,
My apologies for a very simple question. I just downloaded
R 2.6.0. I want to bring in all of the objects from 2.5.0
that I see when I type ls(). I have no idea how to do that.
Thanks in advance.
David
--
=======================================================================
David Kaplan, Ph.D.
Professor
Department of Educational Psychology
University of Wisconsin - Madison
2007 Oct 27
1
Markov models
Hi all, I'm looking for a package that will estimate Markov
models and provide transition probabilities. I'm not
speaking of MCMM estimation packages.
Thanks in advance,
David
--
=======================================================================
David Kaplan, Ph.D.
Professor
Department of Educational Psychology
University of Wisconsin - Madison
Educational Sciences, Room 1061
2006 Oct 08
2
Generating bivariate or multivariate data with known parameter values
Greetings,
I'm interested in generating data from various bivariate or
mulitivariate distributions (e.g. gamma, t, etc), where I can specify
the parameter values, including the correlations among the variables. I
haven't been able to dig anything up on the faq, but I probably missed
something. A nudge in the right direction would be appreciated.
David
--
2006 Feb 23
2
Working with lists with numerical names
Greetings!
I'm have a hard time working with some data I imported from a baseball
database. Several of the database columns have numbers in them (2B,
3B), and when I try to use these vectors from the data frame, I get
syntax errors, probably because it's interpreting the name as a number:
> show(batting2005)
playerID yearID stint teamID lgID G AB R H 2B 3B HR RBI SB CS BB
2007 Nov 12
2
graphical parameters and acf
Hi,
I'm plotting 5 autocorrelation plots on one page. Using
par(mfrow=c(3,2)) everything comes out fine. However, for
each plot, it prints a title on top of each plot that says
Series followed by the variable name used in the plot. I
want to suppress those titles, but I also want a general
figure title on the bottom of the page. I've looked at the
Murrell book as well as the acf
2006 Dec 10
3
R and LaTeX
Hi all,
I have started using LaTeX for writing papers and I have heard that R
works well with LaTeX. I'm specifically interested in how I can have
LaTeX read in R generated graphics - for example graphs formed by
matplot, or other such processes. Does anyone out there use LaTeX and
can point me in the right direction?
Thanks
David
--
2006 Aug 26
2
Permanently changing gui preferences
Greetings,
I made changes to my gui preferences and saved them. When I close and
then open R, it reverts back to default preferences. How do I
permanently change gui preferences?
Thanks in advance.
David
--
========================================================================
David Kaplan, Ph.D.
Professor
Department of Educational Psychology
University of Wisconsin - Madison
2006 Sep 29
1
time-series packages
Greetings,
Are there R packages that perform time-series analyses - particularly
estimation of ARIMA models along with unit-root tests? I know that
FinMetrics in the S-Plus program will do it, but I'm looking for R
packages, as well any reference material for estimating time-series'
models in R.
Thanks in advance,
David
--
2006 Sep 30
1
R 2.3.1 and SPSS 14.0
Hi,
Are there any incompatibilities with R 2.3.1 and SPSS 14.0 with regard
to the read.spss command?
Thanks in advance.
David
--
========================================================================
David Kaplan, Ph.D.
Professor
Department of Educational Psychology
University of Wisconsin - Madison
Educational Sciences, Room 1061
1025 W. Johnson Street
Madison, WI 53706
email: dkaplan
2006 Dec 28
1
Error message using normality test in vars
Hi all,
I'm running a vector-time series model with the vars package. When I
test the univariate and multivariate normality of the residuals using
normality(), I get the results, but also this warning
Warning messages:
1: longer object length
is not a multiple of shorter object length in: b2 - rep(3, 4)
2: longer object length
is not a multiple of shorter object length
2017 Oct 27
2
Bug in model.matrix.default for higher-order interaction encoding when specific model terms are missing
Hello Tyler,
I want to bring to your attention the following document: "What
happens if you omit the main effect in a regression model with an
interaction?" (https://stats.idre.ucla.edu/stata/faq/what-happens-if-you-omit-the-main-effect-in-a-regression-model-with-an-interaction).
This gives a useful review of the problem. Your example is Case 2: a
continuous and a categorical regressor.