similar to: Simulate Mixture Model data

Displaying 20 results from an estimated 1000 matches similar to: "Simulate Mixture Model data"

2006 Mar 16
2
DIfference between weights options in lm GLm and gls.
Dear R-List users, Can anyone explain exactly the difference between Weights options in lm glm and gls? I try the following codes, but the results are different. > lm1 Call: lm(formula = y ~ x) Coefficients: (Intercept) x 0.1183 7.3075 > lm2 Call: lm(formula = y ~ x, weights = W) Coefficients: (Intercept) x 0.04193 7.30660 > lm3 Call:
2005 Jul 04
2
Permissions Question
List- I have a permissions issue. Below is my script. I am attempting to archive several data sets from our current production server (a Win2K box) to our new server, a high performance Fibre Channel Linux-based system. C:\bin\cwRsyncServer\bin\rsync.exe -avvi --rsh="c:\bin\cwRsyncServer\bin\ssh.exe -l root" --password-file=c:\bin\cwRsyncServer\etc\secret --progress --stats
2005 Aug 26
2
Fitting data to gaussian distributions
Hi! I need to fit a data that shows up as two gaussians partially superimposed to the corresponding gaussian distributions, i.e. data=c(rnorm(100,5,2),rnorm(100,-6,1)) I figured it out how to do it with mle or fitdistr when only one gaussian is necessary, but not with two or more. Is there a function in R to do this? Thank you very much in advance, Luis
2008 Feb 18
4
newbie (me) needs to model distribution as two overlapping gaussians
Recently, I have been working with some data that look like two overlapping gaussian distributions. I would like to either 1) determine the mean and SD for each of the two distributions OR 2) get some (bayesian ?) statistic that estimates how likely an observation is to belong to the left-hand or right-hand distribution In case I'm using the wrong language, my data looks something like
2001 Nov 20
2
Problem: requested 10000 open files, 1014 are available ??
Hi, I am new to this list, and am really stumped on this issue with my samba servers. I woould really appreciate some help. Question: I am having the same type of issue. I was copping a huge set of files over to my samba server, and now, neither server works. Servers: 1) RH 7.1 running Samba, SSH, HTTPD 2) RH 7.1 running Samba, SSH, HTTPD The file trasfer crashed due to lack of space on both
2011 Apr 04
1
Difference in mixture normals and one density
Hello, I am trying to find out if R can do the following: I have a mixture of normals say f = 0.2*Normal(2, 5) + 0.8*Normal(3,2) How do I find the difference in the densities at any particular point of f and at Normal(2,5)? -- Thanks, Jim. [[alternative HTML version deleted]]
2006 May 17
2
Association data clobbering (foreign keys too?)
Can someone please confirm or correct the following statements? If I have the following tables create table as (id int, [...], b_id int); create table bs (id int, [...], a_id int); create table as_bs (a_id int, b_id int); and the associations woould be defined like this class A << ... habtm :bs belongs_to :b end so my Model A has a habtm collection of Bs *plus* a direct
2013 Mar 11
2
vertical lines in R plot
Dear All, May I seek your suggestion on a simple issue. I want to draw vertical lines at some positions in the following R plot. To be more specific, I wish to draw vertical lines at d=c(5.0,5.5,6) and they should go till p=c(0.12,0.60,0.20) . I haven't found any way out, though made several attempts. Please run the following commands first if you are interested in!
2011 May 04
1
hurdle, simulated power
Hi all-- We are planning an intervention study for adolescent alcohol use, and I am planning to use simulations based on a hurdle model (using the hurdle() function in package pscl) for sample size estimation. The simulation code and power code are below -- note that at the moment the "power" code is just returning the coefficients, as something isn't working quite right. The
2007 Aug 07
2
Latest 1.1 tree build failure
Suggestions of how to fix this? mkdir -p /build/work/dovecot-1.1-alpha1 cd /build/work/dovecot-1.1-alpha1 export LDFLAGS='-L/common/pkgs/sqlite-3.4.1.1/lib64 -R/common/pkgs/sqlite-3.4.1.1/lib64' export CPPFLAGS='-pipe -O2 -I/common/pkgs/sqlite-3.4.1.1/include' unset CDPATH make distclean ./configure --prefix=/common/pkgs/dovecot-1.1-alpha1 --disable-nls --disable-ipv6 --with-db
2012 Oct 23
1
Minimizing Computational Time
Dear R-users, May I seek some suggestions from you. I have a long programme written in R with several 'for' loops inside. I just want to get them out by any elegant way (if there is!) to reduce the computational time of the main programme. For instance, is there any smart way for the following programme that will lessen time?
2005 Mar 02
1
Warning: number of items to replace is not a multiple of replacement length
I feel like a complete dolt, as I know this question has been asked by others on a fairly regular basis, but I'm going in circles trying to get the following to work: id.prob<-function (tt) { library(mvtnorm) #============================ Makeham<-function(tt) { a2=0.030386513 a3=0.006688287 b3=0.039047537 t<-tt-20 h.t<-a2+a3*exp(b3*t) S.t<-exp(-a2*t+a3/b3*(1-exp(b3*t)))
2005 Feb 27
2
Help with constrained optimization
Dear all, I need an advice in the following problem. I have to maximize two functions of the form f1(x)=f(y1,x,alpha1,beta1) and f2(x)=(y2,x,alpha2,beta2), the maximization is with respect to alpha1, alpha2, beta1, beta2. I can maximize each function separately using nlm. The problem is that I have to add the constraint of the form g(alpha1)=g(alpha2). The total number of parameters is
2009 Jul 01
2
Difficulty in calculating MLE through NLM
Hi R-friends, Attached is the SAS XPORT file that I have imported into R using following code library(foreign) mydata<-read.xport("C:\\ctf.xpt") print(mydata) I am trying to maximize logL in order to find Maximum Likelihood Estimate (MLE) of 5 parameters (alpha1, beta1, alpha2, beta2, p) using NLM function in R as follows. # Defining Log likelihood - In the function it is noted as
2008 Jan 04
2
R2WinBUGS sending variables as factors
Hello R and BUGS users, I am writing a heirarchical model in R to send to BUGS via R2WinBUGS and I am finding it difficult to get the model to run. I seem to be having two problems. 1) I can't seem to send variables classed as factors (Month), is there a way do this? 2) Checking the Log in WinBUGS I can see that the model is Syntactically correct, but Bugs is not able to recognise the the
2008 Dec 19
1
obtaining output from an evaluated expression
Hi I am trying to use the deriv and eval functions to obtain the value of a function , say "xi-(alpha0+alpha1*gi)" , differentiated with respect to alpha0 and alpha1, in the following way # for gi = 0 > dU1dtheta <- deriv(~ xi-(alpha0+alpha1*gi), c("alpha0","alpha1")) > eval(dU1dtheta) (Intercept) -0.2547153 attr(,"gradient")
2006 Jul 22
1
Why the contrain does not work for selecting a particular range of data?
Dear: Continuing the issue of 'ifelse'! I selecting the data whose 'x2'=1 for maximizing likelihood. I used two way to do this but the results are different. 1.Way one I use the data for x2=1 and run the program. It works for me. Tthe program is described as below: function (parameters,y1,x11) { p<-parameters[1] alpha1<-parameters[2] beta1<-parameters[3]
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
2008 Sep 05
4
v1.2.alpha1 released
http://dovecot.org/releases/1.2/alpha/dovecot-1.2.alpha1.tar.gz http://dovecot.org/releases/1.2/alpha/dovecot-1.2.alpha1.tar.gz.sig This is the only v1.2.alpha announcement I'm going to send to dovecot-news list. Next announcement will be for either v1.2.beta1 or v1.2.rc1. I'm hoping that v1.2 stabilizes pretty soon. There are no huge changes like there were in 0.99->1.0 or
2008 Sep 05
4
v1.2.alpha1 released
http://dovecot.org/releases/1.2/alpha/dovecot-1.2.alpha1.tar.gz http://dovecot.org/releases/1.2/alpha/dovecot-1.2.alpha1.tar.gz.sig This is the only v1.2.alpha announcement I'm going to send to dovecot-news list. Next announcement will be for either v1.2.beta1 or v1.2.rc1. I'm hoping that v1.2 stabilizes pretty soon. There are no huge changes like there were in 0.99->1.0 or