Displaying 20 results from an estimated 10000 matches similar to: "Many to many relationship...I think"
2006 Aug 22
0
Re: Problem with find condition and habtm relationship.
OK. This may help, but it will also make your head hurt. The basic
problem that you''re running into is that you want a "for all"
operator and sql doesn''t have one. Instead, you have to think of the
query in terms of the logically equivalent "not exists not".
Effectively, a proposition is true for all x if you can''t find a
counter-example in
2007 Aug 18
1
Restricted VAR parameter estimation
I have a VAR model with five macro-economic variables, y[1], y[2], y[3], y[4], y[5]. They are related to each other in following manner.
y[1,t] = alpha[1,0] + beta[1,1, 1]*y[1,t-1]+............+beta[1,1, 12]*y[1,t-12] + beta[1,2, 1]*y[2,t-1]+............+beta[1,2, 12]*y[2,t-12] + e[1,t]
y[2,t] = alpha[2,0] + beta[2,2, 1]*y[2,t-1]+............+beta[2,2, 12]*y[2,t-12] + e[2,t]
y[3,t] = alpha[3,0]
2011 Mar 31
0
dfsane arguments
Hi there,
I'm trying to solve 2 nonlinear equations in 2 unknowns using the BB
package.
The first part of my program solves 3 ODEs using the deSolve package. This
part works. The output is used as parameter values in the functions I need
to solve.
The second part is to solve 2 equations in 2 unknowns. This does not work. I
get the error message "unexpected end of input". So what
2015 May 14
3
comportamiento de data.table al hacer calculos por grupos
Estimada comunidad tengo un problema del que no encuentro datos que me
ayuden mucho en la web.
Estoy haciendo calculos por grupos con data,table. Tengo un archivo
(zp.res) con tres columnas que clasifican los datos (sol, con, dia) y
una columna de datos numericos (media), de la siguiente forma:
sol con dia media
1: con 0 1 -22.6
2: con 0 1 -36.6
3: con 0 1 -35.6
y
2007 Apr 11
1
Programming Problem (for loop, random # control, 3 dimentional graph)
Dear List,
This is just a programming problem which i cannot seem
to figure out. I am trying to get a set of power from
a test (say, kolmogorov smirnov) out of a distribution
(say, G-K distribution) as follows. I am trying to
reduce to pain of writing the whole set of data points
(p# below) using "for" loop. However, I seem to have
some problem in it as the output "M" does not
2009 Sep 21
2
Four concurrent Markov chains
Hi,
I am trying to write a simulation of the movements of four animals between
six patches. The movement between patches is based on a first-order Markov
chain so that the next patch they visit depends on the patch they were in
before.
I have written code that allows me to simulate the movement of one animal
but when I add more there seems to be a problem and all chains come back as
N/A. I can
2010 Jul 16
0
Mixed Conditional Logit with nested data
Hello Everyone,
This is my first attempt to do something in R. As a precursor to a Willingness to Pay analysis, I want to conduct a Mixed Conditional Logit analysis but am unsure how to proceed because of some nesting within my data.
Below is some data and code that illustrate what I’m trying to do. The data are based on responses to a conjoint survey obtained during pilot testing. In the
2002 Jan 30
1
mosaicplot(formula, data)--- bugged?
I have been tinkering with mosaicplot() and friends as a way
of learning R. As part of this, I've written a pair.table()
method for mosaic matrices, and would like to extend mosaicplot
to work with loglin and logln (MASS) objects. I'm using
R 1.4.0 on Win 98.
I've been trying to figure out the formula interface, and think
there's a bug, but not sure how to find it, yet alone fix
2011 Dec 08
2
Relationship between covariance and inverse covariance matrices
Hi,
I've been trying to figure out a special set of covariance
matrices that causes some symmetric zero elements in the inverse
covariance matrix but am having trouble figuring out if that is
possible.
Say, for example, matrix a is a 4x4 covariance matrix with equal
variance and zero covariance elements, i.e.
[,1] [,2] [,3] [,4]
[1,] 4 0 0 0
[2,] 0 4
2005 Nov 12
1
how to make automatically each level from data.frame to vector
Dear R-helpers,
Suppose I have dataset like this below:
data(HairEyeColor)
dfHEC <- as.data.frame(as.table(HairEyeColor))
my.dfHEC <- data.frame(Hair=rep(dfHEC$Hair,dfHEC$Freq),
Eye=rep(dfHEC$Eye,dfHEC$Freq),
Sex=rep(dfHEC$Sex,dfHEC$Freq))
my.dfHEC
my.dfHEC$Hair
my.dfHEC$Eye
my.dfHEC$Sex
and I know all levels for Hair, Eye and Sex.
In my case, I
2003 Jun 13
2
formula (joint, conditional independence, etc.) - mosaicplots
Hi,
Can someone set me straight as to how to write formulas in R to indicate:
complete independence [A][B][C]
joint independence [AB][C]
conditional independence [AC][BC]
nway interaction [AB][AC][BC]
?
For example, if I have 4 factors:
hair colour, eye colour, age, sex
does
> mosaicplot( frequency ~ hair + eye + age + sex)
mean that the model fitted is of complete independence of
2011 Jul 19
2
Taking all "complete" diagonals of a matrix
Hi R-Help!
I am trying to find a nicer way of extracting all the "complete" diagonals
of a matrix. I am working with very large matrices that have many more rows
than columns. I want to be able to extract each of the diagonals that are
as long as the number of columns in the matrix. I have written a rather
ugly function that presently does the job. It illustrates what I am trying
to
2010 Oct 03
1
plyr: a*ply with functions that return matrices-- possible bug in aaply?
I have an application where I have a function to calculate results for
a 2-way table or matrix, which
returns a matrix with one less row and column. To keep this short, the
function below captures the structure:
fun2way <- function(f){
if (!length(dim(f)) ==2) stop("only for 2-way arrays")
R <- dim(f)[1]
C <- dim(f)[2]
f[1:(R-1), 1:(C-1)]
}
Now, I want to
2015 Apr 29
0
Formula evaluation, environments and attached packages
Hi Milan,
I expect I may be able to do something about the way the terms are
evaluated, to ensure the evaluation is done in the gnm namespace (while
still ensuring the variables can be found!).
In the meantime, I think the following will work:
Mult <- gnm::Mult
f <- Freq ~ Eye + Hair + Mult(Eye, Hair)
gnm::gnm(f, family=poisson, data=dat)
Hope that helps,
Heather
On Wed, Apr 29, 2015,
1999 May 02
0
WinPopUp messages triggers serious error
Dear SAMBA gurus,
I browsed the list archives but found nothing relevant about this big
(IMHO) problem. Only just another problem like mine, unfortunately
unanswerd :(.
I have here samba-2.0.3 on a Linux box, libc5, manually compiled
without problems.
All is well EXCEPT WinPopUp messages, I can send them OK but I cannot
receive.
As receiver I set LinPopUp but I don't think that is ever
1999 May 02
0
URGENT: WinPOPUp triggers permission problem
Dear SAMBA gurus,
I browsed the list archives but found nothing relevant about
this big
(IMHO) problem. Only just another problem like mine, unfortunately
unanswerd :(.
I have here samba-2.0.3 on a Linux box, libc5, manually compiled
without problems. BTW kernel is 2.2.7ac1.
All is well EXCEPT WinPopUp messages, I can send them OK but I
cannot
receive.
As receiver
2003 May 06
0
for what it's worth, I think I have inadvertently solved an old problem...
All,
For the longest time I was having this strange folder recursion problem. It persisted through many samba upgrades. The problem can be seen here in this thread:
http://groups.google.com/groups?hl=en&lr=lang_en&ie=UTF-8&oe=UTF-8&safe=off&frame=right&th=48f08dabcabb2877&seekm=9oglr1%241d66%241%40FreeBSD.csie.NCTU.edu.tw#link1
I think my configuration was wrong, and
2015 Apr 29
2
Formula evaluation, environments and attached packages
Hi!
Some time ago, I replaced calls to library() with calls to
requireNamespace() in my package logmult, in order to follow the new
CRAN policies. But I just noticed it broke jackknife/bootstrap using
several workers via package parallel.
The reason is that I'm running model replicates on the workers, and the
formula includes non-standard terms like Mult() which are provided by
gnm. If gnm
2005 Apr 29
0
handling of zero and negative indices in src/main/subscript.c:mat2indsub() (PR#7824)
This message contains a description of what looks like a bug, examples
of the suspect behavior, a proposed change to the C code to change this
behavior, example of behavior with the fix, and suggestions for 3 places
to update the documentation to reflect the proposed behavior. It is
submitted for consideration for inclusion in R. Comments are requested.
Currently, the code for subscripting
2005 May 06
0
(PR#7824) handling of zero and negative indices in
I've put this in (with some different wording). Although S blithely
accepts mis-dimensioned index matrices I agree this is wrong and have made
it an error.
On Fri, 29 Apr 2005 tplate@acm.org wrote:
> This message contains a description of what looks like a bug, examples
> of the suspect behavior, a proposed change to the C code to change this
> behavior, example of behavior with