Displaying 13 results from an estimated 13 matches for "theta4".
Did you mean:
theta
2004 May 15
2
questions about optim
Hi,
I am trying to do parameter estimation with optim, but I can't get it to
work quite right-- I have an equation X = Y where X is a gaussian, Y is a
multinomial distribution, and I am trying to estimate the probabilities of
Y( the mean and sd of X are known ), Theta1, Theta2, Theta3, and Theta4; I
do not know how I can specify the constraint that Theta1 + Theta2 + Theta3 +
Theta4 = 1 in optim. Is there another method/package that I should use for
this?
Also, I wonder if there's a more elegant way to code this equation in R;
right now my function looks something like Y/rnorm( 10000...
2018 Feb 13
3
Help with regular expressions
R 3.4.2
OS X
Colleagues
I would appreciate some help with regular expressions.
I have string that looks like:
" ITERATION ,THETA1 ,THETA2 ,THETA3 ,THETA4 ,THETA5 ,THETA6 ,THETA7 ,SIGMA(1,1) ,SIGMA(2,1) ,SIGMA(2,2)?
In the entries that contain:
(X,Y) # for example, SIGMA(1,1)
I would like to replace the comma with a period, e.g., SIGMA(1.1) but NOT the other c...
2012 Mar 16
2
Elegant Code
....,etc.
b1 <- rigamma(50,1,1)
theta1 <- rgamma(50,0.5,(1/b1))
sim1 <- rpois(50,theta1)
b2 <- rigamma(50,1,1)
theta2 <- rgamma(50,0.5,(1/b2))
sim2 <- rpois(50,theta2)
b3 <- rigamma(50,1,1)
theta3 <- rgamma(50,0.5,(1/b3))
sim3 <- rpois(50,theta3)
b4 <- rigamma(50,1,1)
theta4 <- rgamma(50,0.5,(1/b4))
sim4 <- rpois(50,theta4)
b5 <- rigamma(50,1,1)
theta5 <- rgamma(50,0.5,(1/b5))
sim5 <- rpois(50,theta5)
par(mfrow=c(1,5))
boxplot(sim1)
boxplot(sim2)
boxplot(sim3)
boxplot(sim4)
boxplot(sim5);
Thanks,
Raphael
2018 Feb 13
0
Help with regular expressions
...isher at plessthan.com> wrote:
> R 3.4.2
> OS X
>
> Colleagues
>
> I would appreciate some help with regular expressions.
>
> I have string that looks like:
> " ITERATION ,THETA1 ,THETA2 ,THETA3 ,THETA4 ,THETA5 ,THETA6 ,THETA7 ,SIGMA(1,1) ,SIGMA(2,1) ,SIGMA(2,2)?
>
> In the entries that contain:
> (X,Y) # for example, SIGMA(1,1)
> I would like to replace the comma with a pe...
2008 Nov 06
1
trouble with for loop
...oop is ended from there and it does not move to the next
iteration. So the rest of the initial values are
never tried. Here is a simple example:
mat.inv <- function(theta){
mat1 <- matrix( theta, nr=2)
inv <- solve(mat1)
res <- theta[1]+inv[1,1]
res
}
for (i in 1:7){
theta4 <- i
theta.vec <- c(1,2,2,theta4)
theta.res <- mat.inv(theta.vec)
write.table(theta.res, paste("result",i,".txt",sep=""))
}
It stops when i=4. I need to try other values. How would I get it to
simply move on to the next
iteration :i=5,6,7 without c...
2018 Feb 13
1
Help with regular expressions
...> R 3.4.2
>> OS X
>>
>> Colleagues
>>
>> I would appreciate some help with regular expressions.
>>
>> I have string that looks like:
>> " ITERATION ,THETA1 ,THETA2 ,THETA3 ,THETA4 ,THETA5 ,THETA6 ,THETA7 ,SIGMA(1,1) ,SIGMA(2,1) ,SIGMA(2,2)?
>>
>> In the entries that contain:
>> (X,Y) # for example, SIGMA(1,1)
>> I would like to replace the...
2004 Mar 18
1
profile error on an nls object
...p.res.S <- summary(hyp.res)
> hyp.res.S
Formula: log(y) ~ log(pdf.hyperb(theta, X))
Parameters:
Estimate Std. Error t value Pr(>|t|)
theta1 0.0136876 0.0359964 0.380 0.705
theta2 0.3894060 0.3079860 1.264 0.211
theta3 -4.8975822 0.2219928 -22.062 <2e-16 ***
theta4 0.0004141 0.0005457 0.759 0.451
---
Signif. codes: 0 `***' 0.001 `**' 0.01 `*' 0.05 `.' 0.1 ` ' 1
Residual standard error: 0.1542 on 66 degrees of freedom
Correlation of Parameter Estimates:
theta1 theta2 theta3
theta2 -0.02168
theta3 -0.02029 0.997736...
2003 Feb 22
2
4-parameter logistic model
Dear R users
I'm a new user of R and I have a basic question about the 4-parameter
logistic model. According to the information from Pinheiro & Bates the model
is:
y(x)=theta1+(theta2-theta1)/(1+exp((theta3-x)/theta4)) ==
y(x)=A+(B-A)/(1+exp((xmid-input)/scal))
from the graph in page 518 of the book of the same authors (mixed models in
S) theta 1 corresponds to the horizontal asymptote as x goes to infinity and
theta2 the horizontal asymptote as x goes to -infinity. When I use the
function SSfpl(input,A,B,xmid...
2009 Sep 07
1
Scan and read.table
...could be used on the dataset that looks like
as provided at the end of this email? In each section of a dataset, 1st line
of the section is a table title, followed by names of the columns and rows
of data.
TABLE NO. 4: MCMC Bayesian Analysis
ITERATION THETA1 THETA2 THETA3 THETA4
SIGMA(1,1) OMEGA(1,1) OMEGA(2,2) OBJ
-10000 1.63523E+00 1.56116E+00 7.51601E-01 2.35158E+00
5.71097E-02 1.66941E-01 1.39843E-01 -2573
-9999 1.60770E+00 1.48763E+00 7.25607E-01 2.41005E+00
4.15829E-02 1.75023E-01 1.14078E-01 -2588
-9998 1.67015E+00 1.50...
2004 Feb 26
2
Structural Equation Model
Hello all!
I want to estimate parameters in a MIMIC model. I have one latent
variable (ksi), four reflexive indicators (y1, y2, y3 and y4) and four
formative indicators (x1, x2, x3, x4). Is there a way to do it in R? I
know there is the SEM library, but it seems not to be possible to
specify formative indicators, that is, observed exogenous variables
which causes the latent variable.
Thanks,
2007 Jun 27
1
SEM model fit
...-> enf, a3, 0.2
attn -> nvatt, NA, 1
attn -> crimatt, lam4, 1.3
attn -> asltatt, lam5, 1.2
attn <-> attn, psi2, 0.5
nvatt <-> nvatt, theta4, 0.5
crimatt <-> crimatt, theta5, 0.1
asltatt <-> asltatt, theta6, 0.2
gender -> attn, a4, 0.2
acon -> acon1, NA, 1
acon -> acon2, lam4, 1.5
acon...
2007 Jul 17
1
Missing value in circ.mean and polar.plot
...day, circ.mean)
tapply(theta.3, day, circ.mean)
tapply(theta.4, day, circ.mean)
# polar plot
par(mfrow=c(2,2))
library(plotrix)
polar.plot(strenght, theta1, main="1")
polar.plot(strenght, theta2, main="2")
polar.plot(strenght, theta3), main="3")
polar.plot(strenght, theta4, main="4")
François Gagnon
Biologiste, étudiant PFETE, Section Conservation des populations/
Biologist, FSWEP student, Populations conservation Division
Service canadien de la faune/Canadian Wildlife Service
Environnement Canada/Environment Canada
1141, route de l'Église B.P. 10100...
2011 Feb 22
1
Adjusting for autocorrelation in a panel model
I am working with panel data. I am using the plm package to do this.
I would like to do be able to adjust for autocorrelation, as one does with
glm models and correlation structures (eg corr=corARMA(q=4)) . In
particular, I want to employ MA(4) error structure.
Is there a way of doing this with the plm package?
(Note: I do not really want to use the pggls function for various