Displaying 20 results from an estimated 86 matches for "mu1s".
Did you mean:
mu1
2012 Oct 05
2
problem with convergence in mle2/optim function
Hello R Help,
I am trying solve an MLE convergence problem: I would like to estimate
four parameters, p1, p2, mu1, mu2, which relate to the probabilities,
P1, P2, P3, of a multinomial (trinomial) distribution. I am using the
mle2() function and feeding it a time series dataset composed of four
columns: time point, number of successes in category 1, number of
successes in category 2, and
2012 Sep 27
0
problems with mle2 convergence and with writing gradient function
Dear R help,
I am trying solve an MLE convergence problem: I would like to estimate
four parameters, p1, p2, mu1, mu2, which relate to the probabilities,
P1, P2, P3, of a multinomial (trinomial) distribution. I am using the
mle2() function and feeding it a time series dataset composed of four
columns: time point, number of successes in category 1, number of
successes in category 2, and
2012 Oct 11
2
model selection with spg and AIC (or, convert list to fitted model object)
Dear R Help,
I have two nested negative log-likelihood functions that I am optimizing
with the spg function [BB package]. I would like to perform model
selection on these two objective functions using AIC (and possibly
anova() too). However, the spg() function returns a list and I need a
fitted model object for AIC(), ICtab() [bbmle package], or anova().
How can I perform AIC-based model
2007 Oct 23
1
How to avoid the NaN errors in dnbinom?
Hi, The code below is giving me this error message:
Error in while (err > eps) { : missing value where TRUE/FALSE needed
In addition: Warning messages:
1: In dnbinom(x, size, prob, log) : NaNs produced
2: In dnbinom(x, size, prob, log) : NaNs produced
I know from the help files that for dnbinom "Invalid size or prob will
result in return value NaN, with a warning", but I am not able
2006 May 21
2
nls & fitting
Dear All,
I may look ridiculous, but I am puzzled at the behavior of the nls with
a fitting I am currently dealing with.
My data are:
x N
1 346.4102 145.428256
2 447.2136 169.530634
3 570.0877 144.081627
4 721.1103 106.363316
5 894.4272 130.390552
6 1264.9111 36.727069
7 1788.8544 52.848587
8 2449.4897 25.128742
9 3464.1016 7.531766
10 4472.1360 8.827367
11
2008 Feb 15
1
Questions about EM algorithm
Dear all:
Assume I have 3 distributions, x1, x2, and x3.
x1 ~ normal(mu1, sd1)
x2 ~ normal(mu2, sd2)
x3 ~ normal(mu3, sd3)
y1 = x1 + x2
y2 = x1 + x3
Now that the data I can observed is only y1 and y2. It is
easy to estimate (mu1+m2), (mu1+mu3), (sd1^2+sd2^2) and
(sd1^2+sd3^2) by EM algorithm since
y1 ~ normal(mu1+mu2, sqrt(sd1^2+sd2^2)) and
y2 ~ normal(mu1+mu3, sqrt(sd1^2+sd3^2))
However, I want
2011 Feb 24
3
problem in for loop
Hi all.
I was having some trouble with a for loop and I found the problem is the
following.
Does anyone have some idea why I got the following R result? Since mone
is equal to 3, why
mu1 only have 2 components?
library(MASS)
> p0 <- seq(0.1, 0.9,by=0.1)
> m <- 10
>
>
> p0 <- p0[7]
>
> ## data generation
>
> mzero <- p0*m
> mone <- m-mzero
>
2008 Apr 13
0
R project
...message returned. My code is:
proj1.sim<-function(){
tests<-c("t","Wilcoxon","bootstrap")
distns<-c("Normal","Uniform","Beta")
sample.sizes<-c("5","10","25","50","100")
mu1s<-c("0","0.5","1","1.5","2")
res<-array(0,c(length(tests),length(distns),length(sample.sizes),length(mu1s)))
dimnames(res)<-list(tests,distns,sample.sizes,mu1s)
for(test in tests){
for(distn in distns){
for(sample.size in sam...
2012 Feb 15
2
integrate (error: evaluation of function gave a result of wrong length)
Dear all,
I am trying to use the integrate function in R but it seems that it does not
work in my example and I cannot figure out why. I create a function Mu1
(which works fine) and try to integrate by the code:
n <- 100
Ctrl <- as.matrix(cbind(runif(n, -30, 30)))
W <- Ctrl + as.matrix(rnorm(n))
Rsp <- (W>as.matrix(sample(10, n, T)))*1
Mu1 <- function(x, Y=Rsp, Xc=Ctrl){
x
2005 Nov 09
2
About: Error in FUN(X[[1]], ...) : symbol print-name too long
Hi,
I??m trying to use the Win2BUGS package from R and I have a similar problem
that reurns with the message:
Error in FUN(X[[1]], ...) : symbol print-name too long
But, there is no stray ` character in the file ( Sugestions given by: Duncan
Temple Lang <duncan>
Date: Mon, 26 Sep 2005 07:31:08 -0700 )
The progam in R is:
library(R2WinBUGS)
library(rbugs)
dat <-
2013 Feb 01
2
How does this function print, why is n1 which equals 1 printed as 2?
Windows 7, R 2.12.1
Colleagues,
I am trying to understand the n.for.2means function. The code below is a copy of the function (renamed to n.for.2means.js). I have inserted a single line of code towards the bottom of the function which uses the cat function to print the value of n1. You will note the value (preceded by stars) is printed as 1.
The function (1) prints a lot of output without any
2007 Mar 06
2
Estimating parameters of 2 phase Coxian using optim
Hi,
My name is Laura. I'm a PhD student at Queen's University Belfast and have
just started learning R. I was wondering if somebody could help me to see
where I am going wrong in my code for estimating the parameters [mu1, mu2,
lambda1] of a 2-phase Coxian Distribution.
cox2.lik<-function(theta, y){
mu1<-theta[1]
mu2<-theta[2]
lambda1<-theta[3]
2008 Jul 28
1
Mixed model question.
I continue to struggle with mixed models. The square zero version
of the problem that I am trying to deal with is as follows:
A number (240) of students are measured (tested; for reading
comprehension)
on 6 separate occasions. Initially (square zero) I want to treat the
test time as a factor (with 6 levels). The students are of course
``random effects''. Later I want to look at
2006 Jun 07
2
help with combination problem
hello:
I have 3 data.frame objects.
First df object:
Of dim (149,31). Columns 2:31 are marked as T1..T14
and N1..N16.
Name T1 T2 N1 T3 N2 N3 N4 T4
mu1 10 10 9 10 9 9 8 10
mu2 11 11 9 11 9 9 9 11
...
muN 12 12 9 11 9 9 8 12
Second df object:
of Dim (50000,31). Columns 2:31 are maked as T1...T14
and N1..N16.
2007 Mar 13
0
multiplying matrix by vector of times
On 8/3/07 22:12, "Gad Abraham" <g.abraham at ms.unimelb.edu.au> wrote:
> Laura Hill wrote:
>>
>>
>> On 7/3/07 00:15, "Gad Abraham" <g.abraham at ms.unimelb.edu.au> wrote:
>>
>>>> On 6 Mar 2007, at 08:54, Laura Hill wrote:
>>>>
>>>>> Hi,
>>>>>
>>>>> My name is
2013 Apr 09
0
[R-SIG-Finance] EM algorithm with R manually implemented?
Moved to R-help because there's no obvious financial content.
Michael
On Sat, Apr 6, 2013 at 10:56 AM, Stat Tistician
<statisticiangermany at gmail.com> wrote:
> Hi,
> I want to implement the EM algorithm manually, with my own loops and so.
> Afterwards, I want to compare it to the normalmixEM output of mixtools
> package.
>
> Since the notation is very advanced, I
2010 Jun 13
1
using latticeExtra plotting confidence intervals
I am wanting to plot a 95% confidence band using segplot, yet I am wanting
to have groups. For example if I have males and females, and then I have
them in different races, I want the racial groups in different panels. I
have this minor code, completely made up but gets at what I am wanting, 4
random samples and 4 samples of confidence, I know how to get A & B into one
panel and C&D in to
2009 Mar 30
0
Problem in S4 object displaying from within a Java application using JRI
I am using JRI (Java R Interface) library in order to call R from within my
Java application. But since the "rmu1" and "rmu2" ,see the following code,
are objects of type S4 once i run the application the value of Null will be
returned for both of them. On this regard, i would appreciate it if anyone
can tell me how i am going to display and/ or convert these objects to Java
2008 Mar 15
2
Please find the error in my code
hello everybody
I use the following code for my programming & it runs with the error as specified below.Any help that would disolve the error will be highly appreciated.
Thanks in advance
my code looks like this
#### R programme for simulating the power of the two sample t test vs various
#### non-parametric alternatives
sim.size <- 200
sample.size <- 10
set.seed(231)
mu1 <- 0
delta
2010 Mar 20
2
EM algorithm in R
Please help me in writing the R code for this problem. I've been solving this
for 4 days. It was hard for me to solve it. It's a simulation problem in R.
The problem is
My true model is a normal mixture which is given as
0.5 N(-0.8,1) + 0.5 N(0.8,1). This model has two components.
I will get a random sample of size 100 from this model. I will do this 300
times.
That means, I will have