Displaying 20 results from an estimated 10000 matches similar to: "Question about computing offsets automatically"
2002 Jul 31
3
SHLIB
Hi,
I'm having a problem using the 'SHLIB' command in R. I keep getting syntax
errors. The help gives the following usage for it:
Rcmd SHLIB [-o dllname] files
'files' is supposed to be a list of files, but whether I set up a list or a
character vector, I still get a syntax error. Does anyone know if they're
are supposed to be quotes somewhere in there? If someone has an
2004 Nov 12
2
Loading libraries in 2.0.0 (PR#7364)
I'm using version 2.0.0 of R on a Windows 2000 OS. Packages that I installed
in 1.9.1 are not installing properly in 2.0.0. Specifically, I can install
packages from local zip files with the following code (which I execute
through the GUI):
> install.packages(choose.files('',filters=Filters[c('zip','All'),]),
.libPaths()[1], CRAN = NULL)
updating HTML package
2002 Jul 26
1
RNG in R
Hi,
I'm working with a programmer on translating code I wrote for a simulation
in S into FORTRAN. Since the S source code is not available, I decided to
use the random number generator (RNG) in R. The problem is that the R code
is complex enough that we can't isolate the proper source files to include.
Although we can link to the C code and call the RNG, we haven't been able to
find
2007 Jan 09
1
contingency table analysis; generalized linear model
Dear List,
I would appreciate help on the following matter:
I am aware that higher dimensional contingency tables can be analysed using either log-linear models or as a poisson regression using a generalized linear model:
log-linear:
loglm(~Age+Site, data=xtabs(~Age+Site, data=SSites.Rev, drop.unused.levels=T))
GLM:
glm.table <- as.data.frame(xtabs(~Age+Site, data=SSites.Rev,
2002 Aug 04
3
Fortran DLLs
Hello everyone,
I'm using R 1.5.1 on Windows.
I chose the option 'Install Source Files' when installing R.
The code below shows my use of the command SHLIB and the error I get.
C:\R\rw1051\bin>Rcmd SHLIB C:\Stage 9 (Phase 2)\cir3int.f
'perl' is not recognized as an internal or external command,
operable program or batch file.
I'm assuming I'm missing some perl
2008 Mar 29
1
Tabulating Sparse Contingency Table
I have a sparse contingency table (most cells are 0):
> xtabs(~.,data[,idx:(idx+4)])
, , x3 = 1, x4 = 1, x5 = 1
x2
x1 1 2 3
1 0 0 31
2 0 0 112
3 0 0 94
, , x3 = 2, x4 = 1, x5 = 1
x2
x1 1 2 3
1 0 0 0
2 0 0 0
3 0 0 0
, , x3 = 3, x4 = 1, x5 = 1
x2
x1 1 2 3
1 0 0 0
2 0 0 0
3 0 0 0
, , x3 = 1, x4
2003 Mar 13
2
The function 'apply' (PR#2633)
Full_Name: Paul Louisell
Version: 1.6.2
OS: Windows NT
Submission from: (NULL) (192.249.47.9)
I've found a problem with either the 'apply' or 'is.factor' functions, and it
seems like it might be cause for concern. Here are the commands taken directly
from the R session:
> is.factor(test.frame[, 1])
[1] TRUE
> is.factor(test.frame[, 2])
[1] TRUE
>
2009 Dec 13
1
xtabs - missing combination
Dear list,
I am trying to make a contingency table with xtabs but I am getting
a 0 where I expect a 'NA'. Here is a simple example:
options(stringsAsFactors = FALSE)
rn <- LETTERS[1:4]
df1 <- data.frame(r07 = rep(rn, each=4),
r08 = rep(rn, 4), value = 1:16)
xtabs(value ~ r07 + r08, df1)
# Delete the combination [A, C]
df1 <- df1[-3,]
# Set 'value'
2003 Apr 30
1
sorting factors
Hi,
I've been trying to sort the values of the factors of contingency tables
generated with xtabs. For example, I have a factor called "artic" with three
possible values that I would like to order in a specific way -- but I'm not
sure how to go about this.
> test <- read.table("test.tab",header=TRUE,sep="\t")
> artic =
2006 Feb 17
2
creating 3-way tables for mantelhaen.test
Hi R users
I have serveral binary variables (e.g., X1, X2, X3, X4, X5, X,6, and X7) and
one continuous variable (e.g., Y1).
I combined these variables using data.frame()
mydata <- data.frame(X1,X2,X3,X4,X5,X6,X7,Y1)
after that, I sorted this data.frame
rank.by.Y1<-order(mydata[,8])
sorted.mydata<-mydata[rank.by.Y1,]
after that, I replaced Y1's values with values ranging from 1
2003 Jan 29
1
The function 'any' (PR#2503)
Full_Name: Paul Louisell
Version: 1.6.2
OS: Windows NT
Submission from: (NULL) (192.249.47.9)
There is a slight bug in the function 'any'. Given a logical vector (possibly
including values of 'NA'), the default action of any should be as follows:
(i) at least one value = T should return T
(ii) NO values = T
(a) at least one value = 'NA' should return 'NA'
2007 Dec 16
1
format numbers in a contingency table
Hi,
I am constructing a contingency table using xtabs. The function works great:
mo
yr Sep Oct Nov Dec
1950 -7.164486e-02 3.152674e-02 -1.283389e-02 1.570382e-01
1951 3.054293e-02 4.665234e-02 -2.445499e-04 8.720204e-02
1952 3.937034e-02 -4.790636e-02 5.022616e-02 1.180279e-01
but I wonder if there is an argument I can pass to xtabs
2005 Jan 24
1
mcnemar.test odds ratios, CI, etc.
Does anyone know of another version of the Mcnemar test that provides:
1. Odds Ratios
2. 95% Confidence intervals of the Odds Ratios
3. Sample probability
4. 95% Confidence intervals of the sample probability
Obviously the Odds Ratios and Sample probabilities are easy to calculate
from the contingency table, but I would appreciate any help on how to
calculate the confidence
2008 Apr 22
2
Multidimensional contingency tables
How does one ideally handle and display multidimenstional contingency
tables in R v. 2.6.2?
E.g.:
> prob1<- data.frame(victim=c(rep('white',4),rep('black',4)),
+ perp=c(rep('white',2),rep('black',2),rep('white',2),rep('black',2)),
+ death=rep(c('yes','no'),4), count=c(19,132,11,52,0,9,6,97))
> prob1
victim perp
2010 May 24
1
high-dimensional contingency table
Dear Friends.
I am just starting to use R. And in this occasion I want to construct a
high-dimensional contingency table, because I want to crate a mosaic plot
with the vcd package.
My table is in this format:
año ac.rep cat.gru conteos
1 2005 R parejas 253
2 2005 N parejas 23
3 2006 R parejas 347
4 2006 N parejas 39
5 2007 R
2003 Aug 16
2
xtabs to dataframe fails (PR#3754)
Full_Name: Daniel Frey
Version: 1.7.1
OS: Windows 2000
Submission from: (NULL) (80.254.164.242)
Generating a data frame out of a xtabs result acts unusual. Take the following
sample to reproduce it:
> a.a <- c("a","a","a","b","b")
> a.b <- c("c","c","d","e","f")
>
2002 Jul 12
2
Crosstabs in R
Before I reinvent the wheel, I have need for a relatively straightforward
crosstabulation (2 x n) function. I know that R has table(), ftable(),
xtabs(), and summary(xtabs()), but none of these produce a fully "tricked"
out cross-tabulation with marginal totals, expected cell frequencies, and
an array of statistics about the contingency table.
Is there a more complete (something
2007 Jan 23
3
Loess with more than 4 predictors / offsets
Hello,
Does anyone know of an R version of loess that allows more than 4
predictors and/or allows the specification of offsets? For that matter,
does anyone know of _any_ version of loess that does either of the
things I mention?
Thanks,
Paul Louisell
650-833-6254
ploua@allstate.com
Research Associate (Statistician)
Modeling & Data Analytics
ARPC
[[alternative HTML version deleted]]
2012 Aug 10
2
creating a contingency table from a data.frame automatically (NOT BY HAND)
Hello there!
I am still struggling with a binomial response over all categorical
variables (some of them with 3 levels, most with 2 levels). After
initial struggles with glm's (struggle coming from the data, not the
actual analysis) I have decided to prefer contingency tables. I have my
data such as:
response:
2006 Nov 26
2
Fixed zeros in tables
Hello All R Users,
Function loglm() in library MASS can be cajoled to accomodate
structural zeros in a cross-classification table. An example from
Fienberg demonstrates how this can be done.
My question is: Can the function glm() perform the same task? Can
glm() estimate a log-linear model with fixed zeros like loglm()?
Thanks for your help,
Andrew
## Fienberg, The Analysis of Cross-Classified