Displaying 20 results from an estimated 600 matches similar to: "unknown dimensions for loglm"
2011 Aug 17
1
multinomRob - error message
Hi,
I would like to use the multinomRob function to test election results.
However, depending on which independent variables I include and how
many categories I have in the dependent variable, the model cannot be
estimated.
My data look like this (there are 68 observations):
> head(database)
RESTE09 GAUCHE09 PDC09 PLR09 UDC09 MCG09 RESTE05 GAUCHE05 PDC05
D1 1455
2012 Dec 10
3
equivalent of group command of the egen function in Stata
Dear R listers,
I am trying to create a new variable that uniquely identifies groups of
observations in a dataset. So far I couldn't figure out how to do this in
R. In Stata I would simply type:
egen newvar = group(dim1, dim2, dim3)
Please, find below a quick example to show what I am dealing with:
I have a dataset with 4 variables:
var <- runif(50) ## a variable that I want to group
2012 Dec 07
1
points3d and ordirgl
Hello all, I have been using the function ordirgl to plot 3D dynamic
ordinations. The ordirgl function works just fine. IN fact, I was even
able to write a function that allows me to identify points in the 3D plot:
identify.rgl<-function(env_var,ord,dim1,dim2,dim3)
{
tmp<-select3d(button="left")
tmp.keep<-tmp(ord[,dim1],ord[,dim2],ord[,dim3])
2010 Jan 20
1
Change an array into a dataset of four variables, dim1, dim2, dim3 and its elements
Hi,
See my example below.
a<-array(1:12,c(2,3,2))
> a
, , 1
[,1] [,2] [,3]
[1,] 1 3 5
[2,] 2 4 6
, , 2
[,1] [,2] [,3]
[1,] 7 9 11
[2,] 8 10 12
I want to get a result something like
dim1 dim2 dim3 elements
1 1 1
1 2 1
1 3 2
2 1 2
I tried the data.frame and expand.grid functions,
2004 Jul 16
1
labels for 3d Plots
High!
How can I add variable labels (rownames for instance) to a plot created
with ‚clouds’ ( clouds(dim3~dim1*dim2)) – package lattice?
Thanks in advance!
Martina Renninger
[[alternative HTML version deleted]]
2012 Apr 05
0
Multi part problem...array manipulation and sampling
Ok, I have a new, multipart problem that I need help figuring out.
Part 1. I have a three dimensional array (species, sites, repeat counts
within sites). Sampling effort per site varies so the array should be
ragged.
Maximum number of visits at any site = 22
Number of species = 161
Number of sites = 56
I generated the array first by;
2003 Sep 25
1
apply on a 4D array
I am trying to multiply a 3D array of 4x4x4 by the 4 3D arrays of a 4D array
with dimensions 4x4x4x4 (the last dimension being the one that I want to
split by).
(4x4x4 array)
> hiaAry
, , a1
i1 i2 i3 i4
h1 9.5936098 6.001040 0.08772 0.3138600
h2 1.2003500 1.454570 2.79248 0.0000000
h3 0.1346500 0.201220 0.39256 0.5464000
h4 0.0109000 0.012270 0.16417 0.2766900
,
2010 Feb 10
2
system.time provides inaccurate sys.child (PR#14210)
Full_Name: Manuel L?pez-Ib??ez
Version: R version 2.6.2 (2008-02-08)
OS: linux-gnu
Submission from: (NULL) (164.15.10.156)
This is only relevant for CPU intensive child processes. Otherwise, the problem
is not obvious.
Therefore, we need a CPU intensive program like this one:
/************************************/
/*** Compile with: gcc -o timer-test -O0 timer-test.c -lm */
#include
2012 Feb 25
5
which is the fastest way to make data.frame out of a three-dimensional array?
foo <- rnorm(30*34*12)
dim(foo) <- c(30, 34, 12)
I want to make a data.frame out of this three-dimensional array. Each dimension will be a variabel (column) in the data.frame.
I know how this can be done in a very slow way using for loops, like this:
x <- rep(seq(from = 1, to = 30), 34)
y <- as.vector(sapply(1:34, function(x) {rep(x, 30)}))
month <- as.vector(sapply(1:12,
1999 Feb 18
1
[R] possible bug in loglm (PR#122)
Bug report: there is a problem with loglm (or some underlying code)
when used with updating within a function. For example, this code
works as expected, when used outside a function:
-------------------------------------------------
library(MASS)
2001 Dec 31
2
Extracting/setting elements from/in a matrix/array
Dear all,
I had to extracts/set elements from/in a matrix. Let say I have two
vectors dim1 and dim2 of indices in the respective two dimensions of a
matrix: I want to extract all the corresponding elements. I the case of a
nxn matrix, dim1 <- 1:n and dim2 <- 1:n would extract the diagonal.
I know one way would be to use the functions 'row' and 'col', but the
matrixes I
2006 Dec 17
2
question
Dear R users,
I'am using marray and Limma packages to analyze genepix output.
1) how can I filter bad spots from my data (data contains 3 types of bad
spots).
my experiment contains 12 samples and the bad spot are not associated to the
same probes
2) how can I remove control probes from my data ?
I'm sorry, i'm new with R and I can't find answer in packages doc.
best regards,
2011 May 10
3
metaMDS and envfit: Help reading output
Hello R experts,
I've used metaMDS to run NMDS on some fish abundance data, and am also working on correlating environmental data to the NMDS coordinates. I'm fairly new to metaMDS and NMDS in general, so I have what are probably some very basic questions. My fish abundance data consists of 66 sites for which up to 20 species of fish were identified and counted. I ran metaMDS on this data
2010 Dec 27
2
Finding indexes of minum and maximum elements of an array
Hello there
I wish to get the "coordinates" of the minimum element of an array.
For example, if the array were
> H = array(c(8:5,1:4),dim=c(2,2,2))
> H
, , 1
[,1] [,2]
[1,] 8 6
[2,] 7 5
, , 2
[,1] [,2]
[1,] 1 3
[2,] 2 4
then
> min(H)
[1] 1
and
> max(H)
[1] 8
Say "idx" were the function I'm looking for. Then, what
2011 Feb 05
1
different results in MASS's mca and SAS's corresp
Dear list:
I have tried MASS's mca function and SAS's PROC corresp on the
farms data (included in MASS, also used as mca's example), the
results are different:
R: mca(farms)$rs:
1 2
1 0.059296637 0.0455871427
2 0.043077902 -0.0354728795
3 0.059834286 0.0730485572
4 0.059834286 0.0730485572
5 0.012900181 -0.0503121890
6
2013 Jul 06
0
fitting the null loglinear model with MASS::loglm??
The null loglinear model is an intercept-only model for log frequency,
log(f) = \mu
For a one-way table the test of the null model is the same as the
chisq.test.
This can be fit using loglin(), but I don't think there is any way to
specify this using MASS::loglm
> t1<- margin.table(Titanic,1)
> t1
Class
1st 2nd 3rd Crew
325 285 706 885
> loglin(t1, NULL)
0
1999 Apr 14
2
No LOGLM coefficients
Dear R-helpers,
Im trying to fit a Log-linear model on a dataset with bird counts from
60 sites over 14 years for 12 months each (factors for the models). One
of the aims is to predict the missing values in this dataset with model
predictions.
Ive first tried to work with GLM's, that worked fine except for models
with one or more interaction-terms. The GLMs run, run .. for hours. So I
2009 Jan 14
1
loglm fitting
Dear all,
sorry to bother you all with this but I've been trying to use the loglm in
MASS package (v2.8.0) and cannot get any sensible output.
I'm wondering am I doing something very foolish or missing something
obvious.
For example, I tried the documentation help(loglm) example - here's the
code
# Case 1: frequencies specified as an array.
sapply(minn38,
2007 Aug 08
0
Creating netcdf from table
Hi!
I have a table with 3 columns, 2 for long/lat coordinates and 1 for values
(radon concentration). I have Tables for every week of the year 2006, always
same coordinates but other values, i.e. time series. Now I want to create a
NetCDF file for, which is much easier to handle than 52 tables. I tried the
following for the first dataset (i.e first week):
2006 Jun 02
2
basic array question
I have a large array and would like to extract from it the row and
column indices just of values for which a particular boolean condition
is true. I assume there's a simple way to do this, but I haven't
figured it out yet. Any help would be appreciated.
Tim