search for: beta_i

Displaying 19 results from an estimated 19 matches for "beta_i".

Did you mean: beta_1
2009 Jun 03
1
Using constrOptim() function
...rix). I want to optimize the function myFunction() by ONLY changing beta, i.e. x stays constant, with 4 constraints. I have the following code (with a separate source file for the function): rm(list=ls()) source('mySourceFile') x=read.csv("myFile.csv",head=TRUE,sep=",") beta_i=c(1,1,1,1,1,1,-1) ui=rbind(c(1,0,0,0,0,0,0),c(0,1,0,0,0,0,0),c(0,0,1,0,0,0,0),c(0,0,0,0,0,0,-1)) ci=c(0,0,0,0) constrOptim(beta_i, myFunction, NULL, ui, ci, mu = 1e-04, control = list(), method = "Nelder-Mead", outer.iterations = 100, outer.eps = 1e-05) I am getting this error: Error...
2010 Sep 29
1
nlminb and optim
...usly used in this way and so I am struggling a bit to unit test my code since I don't have another data set to compare this kind of estimation to. The likelihood I have is (in tex below) \begin{equation} \label{eqn:marginal} L(\beta) = \prod_{s=1}^N \int \prod_{i=1}^K\frac{e^{x_{is}(\theta_s-\beta_i)}} {x_{is}!e^{e^(\theta_s-\beta_i)}} f(\theta)d(\theta) \end{equation} Where I view $\theta$ as a nuisance parameter and so I integrate it out of the likelihood. The goal is to get parameter estimates for $\beta$. The integral cannot be easily evaluated so I approximate it as: \begin{equation} \l...
2018 Feb 16
2
[FORGED] Re: SE for all levels (including reference) of a factor atfer a GLM
...he parametrisation of the model which by default in R is formed using the so-called "treatment" contrasts. To wander from R into statistics (sorry Bert) the problem arises because the "usual" parametrisation of the model is the "over-parametrised" form: Y_ij = mu + beta_i + E_ij (i = 1, ..., I, j = 1, ..., J_i) where Y_ij is the j-th observation corresponding to the i-th "treatment" or group. (Things get a bit more complicated in "multi-way" models; let's not go there.) The parameter "mu" is the "grand mean" and the &...
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
2009 Jan 15
1
logistic regression - exp(estimates)?
hello. I have a question on the interpretation of a logistic model. is it helpful to exponentiate the coefficients (estimates)? I think I once read something about that, but I cannot remember where. if so, how would be the interpretation of the exp(estimate) ? would there be a change of the interpretation of the ANOVA table (or is the ANOVA table not really helpful at all?). thanks for your
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 estimators? Any relevant work and codes in R (or S+) is highly appreciated. Kind regards, Ali [[alternative HTML v...
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:
2010 Feb 05
3
metafor package: effect sizes are not fully independent
In a classical meta analysis model y_i = X_i * beta_i + e_i, data {y_i} are assumed to be independent effect sizes. However, I'm encountering the following two scenarios: (1) Each source has multiple effect sizes, thus {y_i} are not fully independent with each other. (2) Each source has multiple effect sizes, each of the effect size from a source...
2011 Jul 19
1
notation question
Dear list, I am currently writing up some of my R models in a more formal sense for a paper, and I am having trouble with the notation. Although this isn't really an 'R' question, it should help me to understand a bit better what I am actually doing when fitting my models! Using the analysis of co-variance example from MASS (fourth edition, p 142), what is the correct notation for the
2012 Nov 29
0
constrOptim
Dear R users, I am using the function "constrOptim" to minimize the -1*log-likelihood where \beta_i>=0 i=1,...,p and \beta_0 is unconstrained. I construct u_i as 0 0 0 ... 0 0 1 0 ... 0 0 0 1 ... 0 . . . ... 0 . . . ... 0 . ....
2003 Oct 23
1
Variance-covariance matrix for beta hat and b hat from lme
Dear all, Given a LME model (following the notation of Pinheiro and Bates 2000) y_i = X_i*beta + Z_i*b_i + e_i, is it possible to extract the variance-covariance matrix for the estimated beta_i hat and b_i hat from the lme fitted object? The reason for needing this is because I want to have interval prediction on the predicted values (at level = 0:1). The "predict.lme" seems to provide point estimates only. The predicted value for new observation of the i_th subject, with E_i a...
2010 Mar 09
1
penalized maximum likelihood estimation and logistf
Hi, I got two questions and would really appreciate any help from here. First, is the penalized maximum likelihood estimation(Firth Type Estimation) only fit for binary response (0,1 or TRUE, FALSE)? Can it be applied to multinomial logistic regression? If yes, what's the formula for LL and U(beta_i)? Can someone point me to the right reference? Second, when I used *logistf *on a dataset with binary response, I got the following error msg: "Error in if (mx > 1) delta <- delta/mx : missing value where TRUE/FALSE needed" What does this msg mean? does it mean the dataset includ...
2002 Feb 20
2
How to get the penalized log likelihood from smooth.spline()?
...imized, where J(f) := \int f''(t)^2 dt is the quadratic roughness functional use. Since J(f) is quadratic one can find a matrix \Sigma such that J(g) = c^T{\Sigma}c where c is the vector of spline coefficients. With J(f) defined as above the elements of \Sigma becomes \Sigma_{ij} = \int \beta_i''(t)\beta_j''(t) dt where \beta(t) is the vector of B-spline base functions. Finally, writing the matrix W as W := diag(\sqrt{w}) one can write L(f) as L(f) = (y - f)^T W^2 (y - f) + \lambda c^T{\Sigma}c which is the form used in help(smooth.spline). So back to my question, usi...
2000 Mar 28
1
the function lme in package nlme
...e function in Splus, does not use the cluster function option. This difference does not appear to be documented in the V&R `R Complements' file. I have data which is divided into 6 groups The lme model is of the form (simplified from the actual model a bit) y = a + b x_{ij} + \alpha_i + \beta_i x_{ij} + \epsilon_{ij} i = 1,...,6. where a and b are fixed effects and \alpha and \beta are random effects. I have a vector of the form clus = (1,1,1,2,5,6,4,4,4,3,...)' where the 1, 2 3 are all factors corresponding to different groups (or clusters in Splus terminology). In Splus I wou...
2006 Oct 22
1
Multilevel model ("lme") question
...2 7150 Intra-subject trajectories of Y very close to linear. I'd like to check whether slope (and maybe also offset) of this line are (in part) predicted by X.baseline. Thus, I think the multilevel model specification should be as follows (i = subject, j=measurement): y_ij = \beta_i + b_i * TIME_ij + \epsilon_ij, with b_i = \zeta_i0 + \zeta_i1 * X.Baseline Is this correct? Now, I am completely unsure how to "translate" this into the syntax needed by lme. Is there any standard procedure on how to get from e.g. the Laird&Ware'82 matrix model notation to the l...
2003 Nov 19
0
multinom question
I'd like to fit a multinomial log-linear model for 4 categories of the form log[(P(D=i | X)/P(D=0 | X)] = alpha_i + X beta_i ; i=1,2,3 but with beta_1 constrained to zero. Is there a way to impose such a constraint in the multinom function? Brad ------------------------------------------------------------------------- Brad McNeney email: mcneney at stat.sfu.ca Dept. of Statistics and Actu...
2004 Mar 24
0
LM omitted variables test
Dear all, Does anybody know whether the (general) Lagrange Multiplier testing framework for restrictions on linear models has been implemented in some package? My goal is to test for omitted variables, i.e. restrictions of the kind beta_i=0, in the specification of an econometric model. There are some particular implementations in this fashion in the lmtest package (e,g, the bgtest() function, where the lagged residuals are taken as the omitted variable); before trying to adapt that code, I would like to check out if there are read...
2010 Feb 18
0
lme - incorporating measurement error with estimated V-C matrix
I have data (each Y_i is a vector) in the form of Y_i = X_i \beta_i + Z_i b_i + epsilon_i Were it not for the measurement error (the epsilon_i) it's a very simple model --- nice and balanced, compound symmetry, and I'd just use lme(y ~ x1 + x2, random=~1|subj, ...) but the measurement error is throwing me off. Because the Y_i are actually deri...
2006 Dec 31
2
zero random effect sizes with binomial lmer [sorry, ignore previous]
I am fitting models to the responses to a questionnaire that has seven yes/no questions (Item). For each combination of Subject and Item, the variable Response is coded as 0 or 1. I want to include random effects for both Subject and Item. While I understand that the datasets are fairly small, and there are a lot of invariant subjects, I do not understand something that is happening here, and in