similar to: constructing appropriate non-intercept formula

Displaying 20 results from an estimated 2000 matches similar to: "constructing appropriate non-intercept formula"

2008 May 16
1
Making slope coefficients ``relative to 0''.
I am interested in whether the slopes in a linear model are different from 0. I.e. I would like to obtain the slope estimates, and their standard errors, ``relative to 0'' for each group, rather than relative to some baseline. Explicitly I would like to write/represent the model as y = a_i + b_i*x + E i = 1, ..., K, where x is a continuous variate and i indexes groups (levels of a
2009 Nov 07
0
solution design for a large scale (> 50G) R computing problem
Hi, I am tackling a computing problem in R that involves large data. Both time and memory issues need to be seriously considered. Below is the problem description and my tentative approach. I would appreciate if any one can share thoughts on how to solve this problem more efficiently. I have 1001 multidimensional arrays -- A, B1, ..., B1000. A takes about 500MB in memory and B_i takes 100MB. I
2009 Aug 06
1
solving system of equations involving non-linearities
Hi, I would appreciate if someone could help me on track with this problem. I want to compute some parameters from a system of equations given a number of sample observations. The system looks like this: sum_i( A+b_i>0 & A+b_i>C+d_i) = x sum_i( C+d_i>0 & C+d_i>A+b_i) = y sum_i( exp(E+f_i) * ( A+b_i>0 & A+b_i>C+d_i) = z A, C, E are free variables while the other
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
2013 Jul 02
0
Optimización MINLP
Muy buenas, Tengo la siguiente duda/problema, He optimizado con éxito un problema de este tipo: \sum f(x_i) donde f es una curva exponencial (función no lineal) sujeto a: a_i < x_i < b_i y \sum f(x_i) < Presupuesto Vamos, es repartir un presupuesto forzando a que inviertas como poco a_i y como mucho b_i para cada i Esto lo hecho correctamente usando el paquete:
2012 Oct 18
7
summation coding
I would like to code the following in R: a1(b1+b2+b3) + a2(b1+b3+b4) + a3(b1+b2+b4) + a4(b1+b2+b3) or in summation notation: sum_{i=1, j\neq i}^{4} a_i * b_i I realise this is the same as: sum_{i=1, j=1}^{4} a_i * b_i - sum_{i=j} a_i * b_i would appreciate some help. Thank you. -- View this message in context: http://r.789695.n4.nabble.com/summation-coding-tp4646678.html Sent from the R
2011 Jan 29
1
Spare matrix multiplication
Dear R, I have a simple question concerning with a special case of spare matrix multiplications. Say A is a 200-by-10000 dense matrix. B is a 10000-by-10000 block- diagonal matrix, and each diagonal block B_i is 100-by-100. The usual way I did A%*%B will take about 30 seconds which is to time consuming because I have to do this thousands of times. I also tried to partition A into 100 small blocks
2006 Aug 24
1
lmer(): specifying i.i.d random slopes for multiple covariates
Dear readers, Is it possible to specify a model y=X %*% beta + Z %*% b ; b=(b_1,..,b_k) and b_i~N(0,v^2) for i=1,..,k that is, a model where the random slopes for different covariates are i.i.d., in lmer() and how? In lme() one needs a constant grouping factor (e.g.: all=rep(1,n)) and would then specify: lme(fixed= y~X, random= list(all=pdIdent(~Z-1)) ) , that?s how it's done in the
2000 Mar 31
2
linear models
Dear R users, I have a couple of linear model related questions. 1) How do I produce a fixed effect linear model using lme? I saw somewhere (this may be Splus documentation since I use Splus and R interchangeably) that using lme(...,random= ~ -1 | groups,...) works, but it gives the same as lme(...,random= ~ 1 | groups,...), ie. fits a random effect intercept term. The reason why I want to do
2010 Mar 04
1
logistic regression by group?
Hi, Looking for a function in R that can help me calculate a parameter that maximizes the likelihood over groups of observations. The general formula is: p = exp(xb) / sum(exp(xb)) So, according to the formulas I've seen published, to do this "by group" is product(p = exp(x_i * b_i) / sum(exp(x_i b_i))) Where i represents a "group" and we iterate through each group.
2005 Jan 17
0
a question of mixed effect in R
Dear all, I have a question about mixed effect model in R. The data set has 5 variables, X(response),subject, times, repeat, indicator The model is X_hijk=a_h+Z_h*b_i+r(ij)+e_hijk , where h=0,1(indicator), i=1,...,n(subject), j=1,...,n_i(times within subject; nested effect),k=1,2,3(repeat). Z_h=1 if h=1 =0 if h=0 b_i~N(0,c^2) random effect of subject r(ij)~N(0,d^2) random effect of times
2003 Jun 19
2
Fitting particular repeated measures model with lme()
Hello, I have a simulated data structure in which students are nested within teachers, and with each student are associated two test scores. There are 20 classrooms and 25 students per classroom, for a total of 500 students and two scores per student. Here are the first 10 lines of my dataframe "d": studid tchid Y time 1 1 1 -1.0833222 0 2 1 1
2006 Oct 22
1
Multilevel model ("lme") question
Dear list, I'm trying to fit a multilevel (mixed-effects) model using the lme function (package nlme) in R 2.4.0. As a mixed-effects newbie I'm neither sure about the modeling nor the correct R syntax. My data is structured as follows: For each subject, a quantity Y is measured at a number (>= 2) of time points. Moreover, at time point 0 ("baseline"), a quantity X is
2003 Mar 30
1
simple test of lme, questions on DF corrections
I''m a physicist working on fusion energy and dabble in statistics only occasionally, so please excuse gaps in my statistical knowledge. I''d appreciate any help that a real statistics expert could provide. Most people in my field do only very simple statistics, and I am trying to extend some work on multivariate linear regression to account for significant between-group
2007 Sep 12
0
constructing an lm() formula in a function
I'm working on some functions for generalized canonical discriminant analysis in conjunction with the heplots package. I've written a candisc.mlm function that takes an mlm object and computes a candisc object containing canonical scores, coeficients, etc. But I'm stumped on how to construct a mlm for the canonical scores, in a function using the *same* right-hand-side of the model
2002 Aug 05
1
constructing a formula
Dear Listers, I am having trouble figuring out how to build a formula using a variable list. For example, I have: a _ data.frame(a=rnorm(1000)) a$b_rnorm(1000)+.5*a$a a$c_rnorm(1000)+.5*a$b a$d_rnorm(1000)+.5*a$b+.1*a$a attach(a) and I estimate, lm(d ~ b+c+d) BUT, I wish to construct a generalized solution in which, ListOfVar _ c('b','c','d') The question is how
2008 Apr 14
1
Formula with no intercept
I'm trying to analyze a model with two variables, one is Group with two levels (male and female), and other is Time with four levels (T1, T2, T3 and T4). And for the convenience of post-hoc testing I wanted to consider a model with no intercept for factor Time, so I tried formula Group*(Time-1) However this seems to give me the following terms in the model GroupMale, GroupFemale, TimeT2,
2004 Jul 22
1
Bug: wrong R-squared in lm formula w/o intercept (PR#7127)
Full_Name: Adriano Azevedo Filho Version: 1.9.1 OS: Windows, Linux Submission from: (NULL) (200.171.246.212) R-squared and Adjusted R-squared appear to be wrong when the formula in lm() is specified without intercept. Problem present in both Windows and Linux 1.9.1 version. Also in the 1.8.1 version for Windows (other versions not checked). Possible example which reproduces the problem:
2008 Jun 02
1
Ancova: formula with a common intercept
I have some data with two categorises plus/minus (p53) and a particular time (Time) and the outcome is a continuous vairable (Result). I set up a maximum model. ancova <- lm(Result~Time*p53) > summary(ancova) .. Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 0.05919 0.55646 0.106 0.916 Time -0.02134 0.01785 -1.195 0.241 p53plus
2011 May 31
2
In a formula, what is the interaction of the intercept and a factor?
For a pedagogical purpose, I was trying to show how the formula for a simple regression line (~1+x) could be crossed with a factor (~1:group + x:group) to fit separate regressions by group. For example: set.seed(201108) dat <- data.frame(x=1:15, y=1:15+rnorm(15), group = sample(c('A','B'), size=15, replace=TRUE)) m1 <- lm(y~ 1 + x, data=dat)