search for: x2b

Displaying 20 results from an estimated 35 matches for "x2b".

Did you mean: 2b
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 ****************************************...
2011 Aug 15
2
MCMC regress, using runif()
Hello, just to follow up a question from last week. Here what I've done so far (here an example): library(MCMCpack) Y=c(15,14,23,18,19,9,19,13) X1=c(0.2,0.6,0.45,0.27,0.6,0.14,0.1,0.52) X2a=c(17,22,21,18,19,25,8,19) X2b=c(22,22,29,34,19,26,17,22) X2 <- function()runif(length(X2a), X2a, X2b) model1 <- MCMCregress(Y~X1+X2()) summary(model1) but I am not sure if my X2-function is working in the MCMCpack? Is a random number drawn each iteration step? I don't think so as the results are varying greatly if...
2020 Oct 03
1
Lahman Baseball Data Using R DBI Package
...t;...2B, 3B, ..." > -> "...\"2B\",\"3B\",..."? > > -Bill > > On Fri, Oct 2, 2020 at 3:49 PM Philip <herd_dog at cox.net> wrote: > >> 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? >> >&g...
2017 Oct 27
2
Bug in model.matrix.default for higher-order interaction encoding when specific model terms are missing
...then > manually remove the X1 column from the model matrix. This gives us the > model matrix one would expect if X1 were removed from the model. We then > successfully calculate the covariance matrix. > >> mm = model.matrix(~(X1+X2)^2,data=design) >> mm > (Intercept) X1 X2B X2C X1:X2B X1:X2C > 2 1 -1 0 0 0 0 > 3 1 1 1 0 1 0 > 4 1 -1 1 0 -1 0 > 5 1 1 0 1 0 1 > 6 1 -1 0 1 0 -1 > >> mm = mm[,-2] >> solve(t(mm) %*% mm) >...
2017 Oct 12
2
Bug in model.matrix.default for higher-order interaction encoding when specific model terms are missing
Hi, I recently ran into an inconsistency in the way model.matrix.default handles factor encoding for higher level interactions with categorical variables when the full hierarchy of effects is not present. Depending on which lower level interactions are specified, the factor encoding changes for a higher level interaction. Consider the following minimal reproducible example: -------------- >
2020 Oct 08
0
Lahman Baseball Data Using R DBI Package
...ry(con2,"SELECT * FROM batting WHERE yearID = 2018 AND AB >600 ORDER BY AB DESC") %>% set_colnames(make.names(colnames(.))) #OR one of the following: library(dplyr) dbGetQuery(con2,"SELECT * FROM batting WHERE yearID = 2018 AND AB >600 ORDER BY AB DESC") %>% rename(X2B = `2B`, X3B = `3B`) library(dplyr) dbGetQuery(con2,"SELECT * FROM batting WHERE yearID = 2018 AND AB >600 ORDER BY AB DESC") %>% `colnames<-`(make.names(colnames(.))) library(dplyr) dbGetQuery(con2,"SELECT * FROM batting WHERE yearID = 2018 AND AB >600 ORDER BY AB DESC&...
2020 Oct 08
1
Lahman Baseball Data Using R DBI Package
...ng WHERE yearID = 2018 AND AB >600 > ORDER BY AB DESC") %>% set_colnames(make.names(colnames(.))) > > #OR one of the following: > > library(dplyr) > dbGetQuery(con2,"SELECT * FROM batting WHERE yearID = 2018 AND AB >600 > ORDER BY AB DESC") %>% rename(X2B = `2B`, X3B = `3B`) > > library(dplyr) > dbGetQuery(con2,"SELECT * FROM batting WHERE yearID = 2018 AND AB >600 > ORDER BY AB DESC") %>% `colnames<-`(make.names(colnames(.))) > > library(dplyr) > dbGetQuery(con2,"SELECT * FROM batting WHERE yearID = 2018...
2017 Nov 02
2
Bug in model.matrix.default for higher-order interaction encoding when specific model terms are missing
...matrix. This gives us the >> > model matrix one would expect if X1 were removed from the model. We then >> > successfully calculate the covariance matrix. >> > >> >> mm = model.matrix(~(X1+X2)^2,data=design) >> >> mm >> > (Intercept) X1 X2B X2C X1:X2B X1:X2C >> > 2 1 -1 0 0 0 0 >> > 3 1 1 1 0 1 0 >> > 4 1 -1 1 0 -1 0 >> > 5 1 1 0 1 0 1 >> > 6 1 -1 0 1 0 -1 >> > &g...
2000 Dec 21
2
Réf. : configure.in: Someone please show me a better way :)
...>----------------------------------------------------------------------------| Q: What platform don't run this script: ---------------------------------------- #!/bin/sh export X0='x0' export X1a="$X0/1" export X1b='$X0/1' export X2a="$X1a/2" export X2b='$X1b/2' $SHELL <<EOF_2 $SHELL <<EOF_1 cat <<EOF #define a "$X2a/aa" #define b "$X2b/bb" EOF EOF_1 EOF_2 ---------------------------------------- Output must be: #define a "x0/1/2/aa" #define b "x0/1/2/bb" W...
2017 Nov 04
2
Bug in model.matrix.default for higher-order interaction encoding when specific model terms are missing
...ct if X1 were removed from the model. We >> >> > then >> >> > successfully calculate the covariance matrix. >> >> > >> >> >> mm = model.matrix(~(X1+X2)^2,data=design) >> >> >> mm >> >> > (Intercept) X1 X2B X2C X1:X2B X1:X2C >> >> > 2 1 -1 0 0 0 0 >> >> > 3 1 1 1 0 1 0 >> >> > 4 1 -1 1 0 -1 0 >> >> > 5 1 1 0 1 0 1 >> >> > 6...
2017 Oct 31
0
Bug in model.matrix.default for higher-order interaction encoding when specific model terms are missing
...X1 column from the model matrix. This gives us the > > model matrix one would expect if X1 were removed from the model. We then > > successfully calculate the covariance matrix. > > > >> mm = model.matrix(~(X1+X2)^2,data=design) > >> mm > > (Intercept) X1 X2B X2C X1:X2B X1:X2C > > 2 1 -1 0 0 0 0 > > 3 1 1 1 0 1 0 > > 4 1 -1 1 0 -1 0 > > 5 1 1 0 1 0 1 > > 6 1 -1 0 1 0 -1 > > > >> mm = mm[,-2]...
2017 Nov 06
2
Bug in model.matrix.default for higher-order interaction encoding when specific model terms are missing
...> >> > then >> >> >> > successfully calculate the covariance matrix. >> >> >> > >> >> >> >> mm = model.matrix(~(X1+X2)^2,data=design) >> >> >> >> mm >> >> >> > (Intercept) X1 X2B X2C X1:X2B X1:X2C >> >> >> > 2 1 -1 0 0 0 0 >> >> >> > 3 1 1 1 0 1 0 >> >> >> > 4 1 -1 1 0 -1 0 >> >> >> > 5 1 1 0 1 0...
2017 Nov 02
0
Bug in model.matrix.default for higher-order interaction encoding when specific model terms are missing
...;> > model matrix one would expect if X1 were removed from the model. We > then > >> > successfully calculate the covariance matrix. > >> > > >> >> mm = model.matrix(~(X1+X2)^2,data=design) > >> >> mm > >> > (Intercept) X1 X2B X2C X1:X2B X1:X2C > >> > 2 1 -1 0 0 0 0 > >> > 3 1 1 1 0 1 0 > >> > 4 1 -1 1 0 -1 0 > >> > 5 1 1 0 1 0 1 > >> > 6 1 -1 0 1...
2017 Nov 04
0
Bug in model.matrix.default for higher-order interaction encoding when specific model terms are missing
...model. We > >> >> > then > >> >> > successfully calculate the covariance matrix. > >> >> > > >> >> >> mm = model.matrix(~(X1+X2)^2,data=design) > >> >> >> mm > >> >> > (Intercept) X1 X2B X2C X1:X2B X1:X2C > >> >> > 2 1 -1 0 0 0 0 > >> >> > 3 1 1 1 0 1 0 > >> >> > 4 1 -1 1 0 -1 0 > >> >> > 5 1 1 0 1 0 1 > >>...
2017 Nov 06
0
Bug in model.matrix.default for higher-order interaction encoding when specific model terms are missing
...gt; >> >> >> > successfully calculate the covariance matrix. > >> >> >> > > >> >> >> >> mm = model.matrix(~(X1+X2)^2,data=design) > >> >> >> >> mm > >> >> >> > (Intercept) X1 X2B X2C X1:X2B X1:X2C > >> >> >> > 2 1 -1 0 0 0 0 > >> >> >> > 3 1 1 1 0 1 0 > >> >> >> > 4 1 -1 1 0 -1 0 > >> >> >> > 5 1 1...
2017 Oct 15
0
Bug in model.matrix.default for higher-order interaction encoding when specific model terms are missing
..., each being a factor: df <- expand.grid(X1=c("p","q"), X2=c("A","B","C")) print(model.matrix(~(X1+X2)^2 ,data=df)) print(model.matrix(~(X1+X2)^2 -X1,data=df)) print(model.matrix(~(X1+X2)^2 -X2,data=df)) The result is: (Intercept) X1q X2B X2C X1q:X2B X1q:X2C 1 1 0 0 0 0 0 2 1 1 0 0 0 0 3 1 0 1 0 0 0 4 1 1 1 0 1 0 5 1 0 0 1 0 0 6 1 1 0 1 0 1 (Intercept) X2B X2C X1q:...
2000 Dec 21
1
configure.in: Someone please show me a better way :)
Q: What platform don't run this script: ---------------------------------------- #!/bin/sh export X0='x0' export X1a="$X0/1" export X1b='$X0/1' export X2a="$X1a/2" export X2b='$X1b/2' $SHELL <<EOF_2 $SHELL <<EOF_1 cat <<EOF #define a "$X2a/aa" #define b "$X2b/bb" EOF EOF_1 EOF_2 ---------------------------------------- Output must be: #define a "x0/1/2/aa" #define b "x0/1/2/bb" W...
2013 Nov 08
1
Different output from lm() and lmPerm lmp() if categorical variables are included in the analysis
...ula = y ~ x1 * x2, data = test) Residuals: Min 1Q Median 3Q Max -17.1777 -9.5306 -0.9733 7.6840 22.2728 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) -2.0036 3.2488 -0.617 0.539 x1 5.3346 0.2861 18.646 <2e-16 *** x2b 2.4952 5.2160 0.478 0.633 x1:x2b -0.3833 0.4568 -0.839 0.404 summary(aptest) Call: lmp(formula = y ~ x1 * x2, data = test, perm = "", seqs = TRUE, center = FALSE) Residuals: Min 1Q Median 3Q Max -17.1777 -9.5306 -0.9733 7.6840...
2011 Jul 28
1
Regression with ranges and displaying them in an XY-Plot
Hello UseRs, I've got 3 variables, the dependent variable Y as well as a max and a min value of the independent variable (Xa and Xb) where in some cases Xa=Xb (so actually a single value for X). First I'd like to perform a regression, but my problem is that my X is a range (acutally a censored independent variable Xa-Xb) rather then one single value. I know already some possible
2003 Jul 23
6
Condition indexes and variance inflation factors
Has anyone programmed condition indexes in R? I know that there is a function for variance inflation factors available in the car package; however, Belsley (1991) Conditioning Diagnostics (Wiley) notes that there are several weaknesses of VIFs: e.g. 1) High VIFs are sufficient but not necessary conditions for collinearity 2) VIFs don't diagnose the number of collinearities and 3) No one has