Displaying 20 results from an estimated 11000 matches similar to: "Making slope coefficients ``relative to 0''."
2010 Feb 03
1
Package plm & heterogenous slopes
Dear r-helpers,
I am working with plm package. I am trying to fit a fixed effects (or
a 'within') model of the form
y_it = a_i + b_i*t + e_it, i.e. a model with an individual-specific
intercept and an individual-
specific slope.
Does plm support this directly?
Thanks in advance!
Otto Kassi
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
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
2012 Mar 08
1
Panel models: Fixed effects & random coefficients in plm
Hello,
I am using {plm} to estimate panel models. I want to estimate a model that
includes fixed effects for time and individual, but has a random individual
effect for the coefficient on the independent variable.
That is, I would like to estimate the model:
Y_it = a_i + a_t + B_i * X_it + e_it
Where i denotes individuals, t denotes time, X is my independent variable,
and B (beta) is the
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
2001 May 23
2
help: exponential fit?
Hi there,
I'm quite new to R (and statistics),
and I like it (both)!
But I'm a bit lost in all these packages,
so could someone please give me a hint
whether there exists a package for fitting
exponential curves (of the type
t --> \sum_i a_i \exp( - b_i t))
on a noisy signal?
In fact monoexponential decay + polynomial growth
is what I'd like to try.
Thanks in advance,
2002 Dec 10
3
clogit and general conditional logistic regression
Can someone clarify what I cannot make out from the
documentation?
The function 'clogit' in the 'survival' package is
described as performing a "conditional logistic regression".
Its return value is stated to be "an object of class clogit
which is a wrapper for a coxph object."
This suggests that its usefulness is confined to the sort of
data which arise in
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
2002 Mar 10
1
multiple pairwise slope comparisons
Hello,
I have a linear model with different slopes for different treatment
groups. I need to pairwise compare the different slope estimates for
the different treatment groups. Is there a package that does pairwise
comparisons of slope coefficients, making the appropriate adjustments in
the P values?
Thanks,
John.
--
==========================================
John Janmaat
Department of
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:
2013 Apr 23
1
Writing contrast statements to test difference of slope in linear regressions
Hi Everyone,
I am uncertain that I am writing the contrast statements correctly. Basically, I'm unsure when to use a -1 and a 1 when writing the contrasts. Specifically I am interested in comparing the slopes between different temperature regimes. Temperature is therefore a factor. Time and percent are numerical. Using the gmodels package I made the following model:
2006 Oct 30
1
Random intercept-slope correlation (nlme)
Dear list members,
I am working with a multilevel growth curve, that in its simplest form goes
like follows:
Yit = Ai + Bi t + eit (the error term is assumed to follow an AR(1)
autorregressive process)
One major topic in my research is the convergence in the values of Y over
time. Thus, I am interested in the relationship between the random effects
for the intercept and the slope, and I
2011 Sep 25
1
Question about syntax in lm function
I encounters some codes in ggplot2 manual and confused with one of its lm syntax. The code is here:
library(ggplot2) d <- subset(diamonds, carat < 2.5 & rbinom(nrow(diamonds), 1, 0.2) == 1) d$lcarat <- log10(d$carat) d$lprice <- log10(d$price) detrend <- lm(lprice ~ lcarat, data = d) d$lprice2 <- resid(detrend) mod <- lm(lprice2 ~ lcarat * color, data = d) # ***
what
2012 Feb 20
1
slope in curves - how to compare?
Hello,
Is there any formula or way to compare slopes of different functions?
If we fit 2 functions in our data, and we have 2 slope parameters, how can we compare these slopes? Plotting y=5x and y=exp(5x) in which slope is equal to 5 in both of them.. doesn't seem that it makes sense to compare them. Maybe what I ask is basic statistics.. but you may be aware of some formula that could
2011 Mar 18
1
Problem with Slope.test function
Hi all,
I need to test the significnce of difference between slopes of two regression lines and regression line with theoretical line. I try to use Slope.test function from emu package,
but an error occured...
library(emu)
d1<-data.frame(P1=c(1,2,3,5,7,8,9,13,14,15),
P2=c(1,2,5,8,11,13,15,15,18,24),
R=c(2,7,8,9,16,21,27,31,33,36)) # First data set
m1<-lm(R~P1+P2+P1*P2,data=d1) # Regr.
2008 Jul 31
1
clustering and data-mining...
Hi all,
I am doing some experiment studies...
It seems to me that with different combination of 5 parameters, the end
results ultimately converged to two scalars. That's to say, some
combinations of the 5 parameters lead to one end result and some other
combinations of the 5 parameters lead to the other end result (scalar).
I am thinking of this is sort of something like clustering or
2004 Mar 29
2
Confidence Intervals for slopes
Hi,
I'm trying to get confidence intervals to slopes from a linear model
and I can't figure out how to get at them. As a cut 'n' paste example:
#################
# dummy dataset - regression data for 3 treatments, each treatment with
different (normal) variance
x <- rep(1:10, length=30)
y <- 10 - (rep(c(0.2,0.5,0.8), each=10)*x)+c(rnorm(10, sd=0.1),
rnorm(10,
2009 Oct 08
1
Slope between two points
Dear All,
Let? 499 piece-wise lines were buit up by 500 pair of observations, via R code below.
x <- 1:500
y <- rnorm(500)
plot(x, y, type = 'b')
I was trying to compute all the slopes?for the ?lines which were connected between two adjacent points. For instance,?slopes?of lines between first and second points, second and third points, and so on, until?between??points 499 and 500,
2009 Oct 19
2
How to get slope estimates from a four parameter logistic with SSfpl?
Hi,
I was hoping to get some advice on how to derive estimates of slopes from four parameter logistic models fit with SSfpl.
I fit the model using:
model<-nls(temp~SSfpl(time,a,b,c,d))
summary(model)
I am interested in the values of the lower and upper asymptotes (parameters a and b), but also in the gradient of the line at the inflection point (c) which I assume tells me my rate of
2004 Jul 20
3
regression slope
Hello,
I'm a newcomer to R so please
forgive me if this is a silly question.
It's that I have a linear regression:
fm <- lm (x ~ y)
and I want to test whether the
slope of the regression is significantly
less than 1. How can I do this in R?
I'm also interested in comparing the
slopes of two regressions:
fm1 <- lm (x ~ y)
fm2 <- lm (a ~ b)
and asking if the slope of fm1 is