Displaying 18 results from an estimated 18 matches for "beta_2".
Did you mean:
beta2
2006 Sep 18
1
non linear modelling with nls: starting values
Hi,
I'm trying to fit the following model to data using 'nls':
y = alpha_1 * beta_1 * exp(-beta_1 * x) +
alpha_2 * beta_2 * exp(-beta_2 * x)
and the call I've been using is:
nls(y ~ alpha_1 * beta_1 * exp(-beta_1 * x) +
alpha_2 * beta_2 * exp(-beta_2 * x),
start=list(alpha_1=4, alpha_2=2, beta_1=3.5, beta_2=2.5),
trace=TRUE, control=nls.control(maxiter = 200))
So the model has 4 parameters (a...
2009 Jun 16
1
turning off escape sequences for a string
Hello,
I would like to create a matrix with one of the columns named
$\delta$. I have also created columns $\beta_1$ , $\beta_2$, etc.
However, it seems like \d is an escape sequence which gets
automatically removed. (Using these names such that they work right in
xtable -> latex)
colnames(simpleReg.mat) <- c("$\beta_1$","$SE(\beta_1)$", "$\beta_2$",
"$SE(\beta_2)$", "$\de...
2012 Feb 21
0
BHHH algorithm on duration time models for stock prices
...n't get the results. I get the following message:
BHHH maximisation
Number of iterations: 0
Return code: 100
Initial value out of range.
I don't know this is so because of the way i have written my loglikelihood or what.
The loglikelihood
LogLik<-function(param){
beta_1<-param[1]
beta_2<-param[2]
beta_3<-param[3]
beta_4<-param[4]
lambda.plus<-beta_1*Iplusless1 + beta_2*Iminusless1
lambda.minus<-beta_3*Iplusless1 + beta_4*Iminusless1
sum(Iplus_new*log(lambda.plus))-sum(log(lambda.plus)*x_new) +
sum(Iminus_new*log(lambda.minus))-sum(log(lambda.minus)*x_new)
}
The g...
2013 Oct 19
2
ivreg with fixed effect in R?
I want to estimate the following fixed effect model:
y_i,t = alpha_i + beta_1 x1_t + beta_2 x2_i,tx2_i,t = gamma_i + gamma_1
x1_t + gamma_2 Z1_i + gamma_3 Z2_i
I can use ivreg from AER to do the iv regression.
fm <- ivreg(y_i,t ~ x1_t + x2_i,t | x1_t + Z1_i + Z2_i,
data = DataSet)
But, I'm not sure how can I add the fixed effects.
Thanks!
[[alternative HT...
2012 Oct 04
1
(no subject)
producing a multi-figure plot, i am try to add beta_1, beta_2,.. beta_9 to
ylab using expression or substitution, but cannot work out like
for (i in 1:9){
plot(seq(1/m, 1-1/m, 1/m), beta.q[,i], type="l", col=1,
ylim=range(beta.q),
xlab="quantile", ylab=expresion(beta[i]))
}
any suggestions will be greatly appreciated.
DL
[[al...
2018 Feb 16
2
[FORGED] Re: SE for all levels (including reference) of a factor atfer a GLM
...; is a more accurate description.)
In order to ascribe unique values to the parameters, one must apply a
"constraint". With the "treatment contrasts" the constraint is that
beta_1 = 0.
As a result the mean for the first treatment is mu, that for the second
treatment is mu + beta_2, and so on.
Consequently the SE corresponding to "(Intercept)" is the SE of
estimated mean for treatment 1. The SE corresponding to beta_2 is the
SE of the estimated *difference* between the mean for treatment 2 and
that for treatment 1, and so on.
Frequently the constraint beta_1 +...
2018 Feb 16
0
SE for all levels (including reference) of a factor atfer a GLM
This is really a statistical issue. What do you think the Intercept term
represents? See ?contrasts.
Cheers,
Bert
Bert Gunter
"The trouble with having an open mind is that people keep coming along and
sticking things into it."
-- Opus (aka Berkeley Breathed in his "Bloom County" comic strip )
On Thu, Feb 15, 2018 at 5:27 PM, Marc Girondot via R-help <
r-help at
2011 Apr 12
2
Testing equality of coefficients in coxph model
Dear all,
I'm running a coxph model of the form:
coxph(Surv(Start, End, Death.ID) ~ x1 + x2 + a1 + a2 + a3)
Within this model, I would like to compare the influence of x1 and x2 on the
hazard rate.
Specifically I am interested in testing whether the estimated coefficient
for x1 is equal (or not) to the estimated coefficient for x2.
I was thinking of using a Chow-test for this but the Chow
2013 Feb 25
3
Empirical Bayes Estimator for Poisson-Gamma Parameters
Dear Sir/Madam,
I apologize for any cross-posting. I got a simple question, which I thought
the R list may help me to find an answer. Suppose we have Y_1, Y_2, ., Y_n ~
Poisson (Lambda_i) and Lambda_i ~Gamma(alpha_i, beta_i). Empirical Bayes
Estimator for hyper-parameters of the gamma distr, i.e. (alpha_t, beta_t)
are needed.
y=c(12,5,17,14)
n=4
What about a Hierarchal B ayes
2018 Feb 16
2
SE for all levels (including reference) of a factor atfer a GLM
Dear R-er,
I try to get the standard error of fitted parameters for factors with a
glm, even the reference one:
a <- runif(100)
b <- sample(x=c("0", "1", "2"), size=100, replace = TRUE)
df <- data.frame(A=a, B=b, stringsAsFactors = FALSE)
g <- glm(a ~ b, data=df)
summary(g)$coefficients
# I don't get SE for the reference factor, here 0:
2006 Sep 07
5
Conservative "ANOVA tables" in lmer
Dear lmer-ers,
My thanks for all of you who are sharing your trials and tribulations
publicly.
I was hoping to elicit some feedback on my thoughts on denominator
degrees of freedom for F ratios in mixed models. These thoughts and
practices result from my reading of previous postings by Doug Bates
and others.
- I start by assuming that the appropriate denominator degrees lies
between n
2005 Dec 29
0
calculating recursive sequences
...had to use "for" loop, which is quite slow. The
loop is necessary, since you need to calculate recursive sequence. Is
there a faster way to do this in R, without using loops?
The model is such:
r_t = \mu + \alpha_2 r_{t-2} + a_t
a_t = \sigma_t\varepsilon_t
\sigma_t^2 =
\beta_1a_{t-1}^2+\beta_2\sigma_{t-1}^2+
1_{\{a_{t-1}>0\}}(\gamma_0+
\gamma_1a_{t-1}^2+\gamma_2\sigma^2_{t-1})
It is asummed that \varepsilon_t are iid and normal with zero mean and
variance one. The data given is r_t, and you have to estimate
variables, \mu, \alpha, \beta and \gamma. Since
\varepsilon_t=\frac{a_t}{\sq...
2013 Apr 30
0
Ridge regression
...Now, by changing my data set(final), I repeat the process 100 times and
obtain 100 such vectors which I store as 100 rows in a 100X5 matrix:
matrix[i,]=coef(reg)[best,] (i varying from 1 to 100)
Now my final estimates for the beta's are:
Beta_0=median(matrix[,1])
Beta_1=median(matrix[,2])
Beta_2=median(matrix[,3])
Beta_3=median(matrix[,4])
Beta_4=median(matrix[,5])
I want to find the p-values of each of the estimated beta's.
I am confused how to extract these p values in R (may be we need to go back
to the reg= lm.ridge model corresponding to each final beta estimate, but I
am not sur...
2007 Aug 15
1
Polynomial fitting
Hi everybody!
I'm looking some way to do in R a polynomial fit, say like polyfit
function of Octave/MATLAB.
For who don't know, c = polyfit(x,y,m) finds the coefficients of a
polynomial p(x) of degree m that fits the data, p(x[i]) to y[i], in a
least squares sense. The result c is a vector of length m+1 containing
the polynomial coefficients in descending powers:
p(x) = c[1]*x^n +
2004 Aug 23
1
Two factor ANOVA with lm()
..._1=(\alpha\beta)_{11}=
(\alpha\beta)_{12}=(\alpha\beta)_{12}=(\alpha\beta)_{31}=0\]
in the model $E[Y_{jkl}]=\mu+\alpha_j+\beta_k+(\alpha\beta)_{jk}$
$j=1,2,3$, $k=1,2$, $l=1,2$, Dobson, page 102.
My question is: how can I incorporate restrictions like
$\alpha_1+\alpha_2+\alpha_3=0$, $\beta_1+\beta_2=0$,
$(\alpha\beta)_{21}+\alpha\beta)_{22}=0$,
$(\alpha\beta)_{31}+(\alpha\beta)_{32}=0$ and
$(\alpha\beta)_{11}+(\alpha\beta)_{21}+(\alpha\beta)_{31}=0$ from the
outset? Or put another way: Why is it that lm() uses the corner point
constraints by default? Where can I find a documentation for thi...
2010 Feb 05
1
Using coxph with Gompertz-distributed survival data.
Dear list:
I am attempting to use what I thought would be a pretty straightforward practical application of Cox regression. I figure users of the survival package must have come across this problem before, so I would like to ask you how you dealt with it. I have set up an illustrative example and included it at the end of this post.
I took a sample of 100 data points from each of two populations
2013 Feb 04
10
duda con lmer. Añadir predictor a nivel de grupos
Hola a todos.
Estoy utilizando la función lmer del paquete lme4 para ajustar un modelo
mixto.
Tengo varias variables en mi data.frame, unas son a nivel individual y
otras a nivel de comarcas. Listo algunas.
ingre_6 : Ingresos (nivel individual)
iscs_a : un indicador sintético resumen de otras variables, calculado
mediante componentes principales.
sau_com : superficie agraria útil de cada una
2004 Aug 23
0
corrections for R-intro.texi (PR#7192)
...@table @option
@item --help
======================================================================
[-as-] {+as:+}
======================================================================
--- R-intro.texi~ Mon Aug 23 13:24:18 2004
+++ R-intro.texi Mon Aug 23 13:24:18 2004
@@ -4945,7 +4945,7 @@
$\beta_2=\theta_2/\theta_1$.
@end tex
Supposing a suitable data frame to be set up we could fit this
-non-linear regression as
+non-linear regression as:
@example
> nlfit <- glm(y ~ x1 + x2 - 1,
======================================================================
[-below.-] {+below:+}
======...