Displaying 20 results from an estimated 100 matches similar to: "scoping rules; summary"
2003 Mar 17
1
scoping rules
Hi
I recently found a bug that was isomorphic to the following:
ll1 <- 2
increment <- function(x)
{
l11 <- 1
return(x+ll1) #bug here
}
Of course, R is obeying the scoping rules just fine, but I'm evidently
not setting the do.what.I.mean.not.what.I.say variable correctly.
Now, how do I avoid making this type of error? ... and what is the
best tool for tracking it down?
--
2006 Mar 27
1
Missing Argument in optim()
Hello everybody,
i already searched the archieves, but i still don't know what is wrong
in my implementation, mybe anybody coud give me some advice
ll1<-function(rho,theta,beta1,beta2,beta3,beta4,t,Szenariosw5,Testfaellew5,X1,X2)
{
n<-length(t)
t<-cumsum(t)
tn<-t[length(t)]
Szenn<-Szenariosw5[length(Szenariosw5)]
2012 May 13
2
Discrete choice model maximum likelihood estimation
Hello,
I am new to R and I am trying to estimate a discrete model with three
choices. I am stuck at a point and cannot find a solution.
I have probability functions for occurrence of these choices, and then I
build the likelihood functions associated to these choices and finally I
build the general log-likelihood function.
There are four parameters in the model, three of them are associated to
2011 Feb 16
2
covar
Hi all,
I want to construct relatedness among individuals and have a look at the
following script.
#########################
rm(list=ls())
N=5
id = c(1:N)
dad = c(0,0,0,3,3)
mom = c(0,0,2,1,1)
sex = c(2,2,1,2,2) # 1= M and 2=F
A=diag(nrow = N)
for(i in 1:N) {
for(j in i:N) {
ss = dad[j]
dd = mom[j]
sx = sex[j]
if( ss > 0
2002 Apr 12
1
Parrot
This is just an idea for comment. Perl6, the upcoming version of Perl has
separated out the runtime into a virtual machine called Parrot. There are
already several small languages (one is C-like, one is Java-like and one is
BASIC-like) that target Parrot and given the popularity of Perl its likely that
others may attempt to target it too.
If R could interface easily with Parrot then it might be
2010 Nov 11
1
metafor: including phylogenetic non-independence among species?
Hello, Is it possible to include information about phylogenetic relatedness
among species (when species are replicates for each study within a
meta-analysis) in a meta-anlaysis in the metafor package?
Alternatively, I wonder if the method f Lajeunesse 2009 American Naturalist
has been adopted in R in any fashion?
Thanks, Scott Chamberlain
[[alternative HTML version deleted]]
2006 Jan 31
1
Mixed-effects models / heterogeneous covariances
Dear R-list,
maybe someone can help me with the following mixed-effects models
problem, as I am unable to figure it out with the 'nlme-bible'.
I would like to fit (in R, obviously) a so-called animal model (google
e. g. "Heritability and genetic constraints of life-history" by Pettay
et al.) to estimate the variance component that is due to genetic
effects. The covariances of
2018 May 01
2
Specifying priors in a multi-response MCMCglmm
Hi all,
I previously emailed about a multinomial model, and after seeking some
additional help, realized that since my response/outcome variables are not
mutually exclusive, I need to use a multi-response model that is *not*
multinomial. I'm now trying to figure out how to specify the priors on the
multi-response model. Any help would be much appreciated.
My data look like this:
X
2010 Mar 29
1
xyplot second y-xis and legend
Dear list,
I try to set a secondary y-axis in a lattice xyplot. This works. However, I
am unable to set a proper legend/key together with the 2nd y-axis under
general xyplot procedures. See example below.
The combination of the par.settings with simpleTheme and other settings
seems to go wrong.
I couldn't find a solution from previous topics. Any suggestions? thanks in
advance!
Robbert
2014 Mar 10
2
[GSoC 2014] clustering of search results
On Mon, Mar 10, 2014 at 3:59 PM, Olly Betts <olly at survex.com> wrote:
> Exactly what approach the project takes isn't nailed down - it just
> seemed something which would be interesting for a student to work on,
> and would be useful to Xapian users.
>
> My understanding of the current clustering branch (which may not be
> completely accurate) is that it clusters
2012 May 18
1
Help for numericDeriv function
Hi,
I am stuck on something for a couple days, I am almost about to give up.
This looks simple, but I can't figure out. I hope I can get some help here.
I am trying to do some symbolic and numerical derivations. Let me explain
the problem. Let's say, I have a matrix as follows:
> load <- matrix(c(3,0,1,4,1,3),nrow=3,ncol=2,byrow=TRUE)
>
> load
[,1] [,2]
[1,] 3 0
2007 Apr 25
1
heatmap and phylogram / dendogram ploting problem, ape package
I am having trouble displaying a dendrogram of evolutionary
relationships (a phylogram imported from the ape package) as the
vertical component of a heatmap, but keeping the hierarchical
clustering of the horizontal component. The relationships of the
vertical component in the generated heatmap are not that of the
dendrogram, although the ordering is.
In more detail, I am attempting to generate
2014 Feb 20
3
[LLVMdev] [LLVM] Forward temp label references on ARM in LDR with .ltorg in inline assembly are broken in trunk
I'm not entirely sure what caused this, but the following code, which used to behave as expected, is now broken:
---- lolwut.c ----------------------------
void lolwut(void) {
__asm __volatile (
"ldr r1, =1f \n"
".ltorg \n"
"1: \n\t"
: : : "r0", "r1" );
}
-------------------------------------------
~/clang
2018 May 01
0
Specifying priors in a multi-response MCMCglmm
1. (Mainly) Statistical issues are generally off topic on this list.
You might want to try the r-sig-mixed-models list instead.
2. However, I think a better answer is to seek local statistical
expertise in order to have an extended discussion about your research
intent in order to avoid producing yet more irreproducible
psychological research.
Cheers,
Bert
Bert Gunter
"The trouble with
2006 Aug 16
1
Specifying Path Model in SEM for CFA
I'm using specify.model for the sem package. I can't figure out how to
represent the residual errors for the observed variables for a CFA
model. (Once I get this working I need to add some further constraints.)
Here is what I've tried:
model.sa <- specify.model()
F1 -> X1,l11, NA
F1 -> X2,l21, NA
F1 -> X3,l31, NA
F1 -> X4,l41, NA
F1 -> X5, NA, 0.20
2017 Dec 21
0
Fitting Beta Distribution
I answer my own question: I had overlooked the fact that the normalization
factor is also a function of the parameters I want to optimise, hence I
should write
dbeta2 <- function(x, shape){
res <- x^(shape-1)*(1-x)^(shape-1)/beta(shape, shape)
return(res)
}
after which the results are consistent.
---------- Forwarded message ----------
From: Lorenzo Isella <lorenzo.isella
2017 Dec 21
1
Fitting Beta Distribution
Dear All,
I need to fit a custom probability density (based on the symmetric beta
distribution B(shape, shape), where the two parameters shape1 and shape2
are identical) to my data.
The trouble is that I experience some problems also when dealing with the
plain vanilla symmetric beta distribution.
Please consider the code at the end of the email.
In the code, dbeta1 is the density of the beta
2008 Sep 13
3
RCov / RSpec segfaults on Ubuntu
Hi all,
I appreciate that this is not an RSpec question, but I wondered if
anyone out there can offer some pointers. We''re using the latest
versions of RSpec and RCov, and ruby --version says this (on the
Ubuntu build server):
ruby 1.8.6 (2008-07-17 patchlevel 279) [x86_64-linux]
We''re getting intermittent (yes, intermittent!) segfaults from the
build when running
2014 Mar 09
2
[GSoC 2014] clustering of search results
Hello guys,
I was looking forward to participate in GSoc14. I have a decent knowledge
about c++ and parsers.
I was looking at the idea pages where I found many interesting projects, in
which "clustering of search results" interests me the most. I want someone
to take me to the right track in understanding the project so that I can
think about its implementation.
According to me, in this
2004 Dec 28
4
Developing R classes
Hi,
I´m trying to write some R classes but I din´t find documentation enought to develop them. I read there is 2 ways to write classes, using S3 ou S4 models. And it seems that S4 is the best model, so I thing I should use this one.
I´m new user of R and I´m searched on the net some information about creating new classes. I found this document: