Displaying 20 results from an estimated 52 matches for "coeficient".
Did you mean:
coefficient
2017 Dec 06
2
Coeficients estimation in a repeated measures linear model
...orm(n = 6, mean = 10)
dat <- data.frame(vals = c(ctrl, ttd),
group = c(rep("ctrl", 6), rep("ttd", 6)),
ind = factor(rep(1:6, 2)))
fit <- lm(vals ~ ind + group, data = dat)
model.matrix(~ ind + group, data = dat)
I am puzzled on how the coeficients are calculated. For example, according
to the model matrix, I thought the intercept would be individual 1 control.
But that is clearly not the case.
For the last coeficient, I understand it as the mean of all differences
between treated vs control at each individual.
I would greatly appreciate if...
2004 Nov 08
1
plotting lm coeficients with their means
I am trying to write a function that will run a linear
model and plot the regression coeficients with their
corresponding means. I am having two problems. I can
get the plot with the function below, but I am having
trouble labeling the points.
function(y,x1,x2,x3,x4){
outlm<-lm(y~x1+x2+x3+x4)
imp<-as.data.frame(outlm$coef[-1])
meanvec<-c(mean(x1),mean(x2),mean(x3),mean(x4))
out&...
2013 May 08
1
How to calculate Hightest Posterior Density (HPD) of coeficients in a simple regression (lm) in R?
Hi!
I am trying to calculate HPD for the coeficients of regression models
fitted with lm or lmrob in R, pretty much in the same way that can be
accomplished by the association of mcmcsamp and HPDinterval functions for
multilevel models fitted with lmer. Can anyone point me in the right
direction on which packages/how to implement this?
Thanks for y...
2009 Jun 07
1
One rather theoretical question about fitting algorithm
Hi,
What I'm trying to achieve is very fast algorithm for fitting logistic
regression model. I have to estimate regression coeficients using
about 10k observations. Once I have coefficients estimated, new 100
rows of data becomes available.... Now I need to reestimate
coeficients using 100 newly arrived observations and removing 100
oldest observations.
So, my question is would it be possible to somehow reuse pre iusly
calculate...
2009 Sep 26
1
renaming intercept column when retrieving coeficients from lme using coef function
I am still fairly new to R and have a fairly rudimentary question. I am
trying to name a vector of coefficients retrieved from a multilevel model
using the coef function. I guess the default name is "Intercept" and I
cannot figure out how to rename it.
I have tried the using the code below to name the column of coefficients
ind.y derived from an lme model. Unfortunately, the
2003 Jun 25
2
within group variance of the coeficients in LME
Dear listers,
I can't find the variance or se of the coefficients in a multilevel model
using lme.
I want to calculate a Chi square test statistics for the variability of the
coefficients across levels. I have a simple 2-level problem, where I want to
check weather a certain covariate varies across level 2 units. Pinheiro
Bates suggest just looking at the intervals or doing a rather
2008 Jul 07
5
question on lm or glm matrix of coeficients X test data terms
Hi,
is there an easy way to get the calculated weights in a regression equation?
for e.g.
if my model has 2 variables 1 and 2 with coefficient .05 and .6
how can I get the computed values for a test dataset for each coefficient?
data
var1,var2
10,100
so I want to get .5, 60 back in a vector. This is a one row example but I would want to get a matrix of multiplied out coefficients
2008 Jan 24
2
testing coeficients of glm
Dear list,
i'm trying to test if a linear combination of coefficients of glm is equal
to 0. For example :
class 'cl' has 3 levels (1,2,3) and 'y' is a response variable. We want to
test H0: mu1 + mu2 - mu3 =0 where mu1,mu2, and mu3 are the means for each
level.
for me, the question is how to get the covariance matrix of the estimated
parameters from glm. but perhaps there
2006 Jan 24
3
R-help Digest, Vol 35, Issue 24
...is actually normalized too something, because it's discrete integral is not
well above the SS amplitude of the signal it computed the periodogram for. In
other words, the powers are not in units of around 4,000, which the peak would
be if the units were merely the modulus squared of the Fourier coeficients of
the data I presented. Alas, the modulus squared of the Fourier coeficients IS
the TWO SIDED unnormalized periodogram, ranging from [-fc, fc] | fc=nyquist
critical frequency. The definition of the ONE SIDED periodogram IS the modulus
squared of the Fourier coeficients ranging over [0, fc], but s...
2004 Mar 11
5
fft question
Hi!
I am using the fft() function the base package to transform some 1d signal.
If I use this standar fucntion I get a very huge first fourier coeficient.
I think this dues to the handling of the borders of the signal.
Usually in fft especially in image processing the signal is simulated to be continuous by adding the signal several times periodically. My question is, is there some function implemented in R handling this or do I have to combine my d...
2007 Feb 27
2
str() to extract components
Hi,
I have been dabbling with str() to extract values from outputs such as
lmer etc and have found it very helpful sometimes.
but only seem to manage to extract the values when the output is one
simple table, any more complicated and I'm stumped :-(
take this example of the extracted coeficients from a lmer analysis...
using str(coef(lmer(resp3~b$age+b$size+b$pcfat+(1|sex), data=b))) yields
Formal class 'lmer.coef' [package "Matrix"] with 3 slots
..@ .Data :List of 1
.. ..$ :`data.frame': 2 obs. of 4 variables:
.. .. ..$ (Intercept): num [1:2] 1.07 1.13
.....
2006 Aug 07
2
Constrain coefs. in linear model to sum to 0
Hello!
I would like to use constrain to sum coeficients of a factor to 0 instead
of classical corner contraint i.e. I would like to fit a model like
lm(y ~ 1 + effectA + effectB)
and say get parameters
intercept
effectA_1
effectA_2
effectB_1
effectB_2
effectB_3
where effectA_1 represents deviation of level A_1 from intercept and
sum(effectA_1, eff...
2007 Nov 07
1
(no subject)
hello,
i am a bit of a statistical neophyte and currently trying to make some sense of confidence intervals for correlation coefficients. i am using the cor.test() function. the documentation is quite terse and i am having trouble tieing up the output from this function with stuff that i have read in the literature. so, for example, i make two sequences and calculate the correlation coefficient:
2003 Jan 31
1
Problems with boot package (empinf returns NA)
Hi
I'm using boot package for some analysis on linear regression
coeficients. My problem is that I can not compute bca intervals, I get
an error message
> bca.ci(blm8901,index=1)
Error in if (!all(rk > 1 & rk < R)) warning("Extreme Order Statistics
used as Endpoints") :
missing value where logical needed
The problem is the empinf.reg funct...
2005 Jul 03
1
Pearson and Spearman correlation coeffcients matrix
Hi everyone,
I've been trying to find a function that outputs the Pearson and/or Spearman
correlation coefficients for several variables with the associated
statistics in one single table/matrix. For what I've been able to understand
the Stats package is only able to compute these coeficients/statistics only
in defined pairs. This becomes time consuming when we want to determine
these measures with, say, 10 variables or more. Does anyone knows a solution
to this?
Kind regards,
Nuno
2005 Aug 18
1
0/0, R segfaults
Hi,
I noticed that when I was conducting some calculation involving
finding correlation coeficients, R stopped abnormally. So I did some
research, and find out that 0/0 was the culprit. For sure 0/0 is not
a valid expression, but R should give a warning, an error msg or NaN
instead of segmentation fault.
I am using R 2.1.0 under Gentoo Linux. My GCC version is 3.3.5.
Xing
2008 Jul 17
1
smooth.spline
I like what smooth.spline does but I am unclear on the output. I can see from the documentation that there are fit.coef but I am unclear what those coeficients are applied to.With spline I understand the "noraml" coefficients applied to a cubic polynomial. But these coefficients I am not sure how to interpret. If I had a description of the algorithm maybe I could figure it out but as it is I have this question. Any help?
Kevin
2010 May 28
1
latex.rms and models fit with GLS
..... but I get the following error
Error in replace.substring.wild(s, old, new, test = test, front = front, :
does not handle > 1 * in old
I think that this might have something to do with the fact that I fit the
model with GLS. (?)
I am looking for a simple way to get a table of estimated coeficients without
hand-making a table in a text editor for inclusion within a LATEX document.
Thanks!
--
Dylan Beaudette
Soil Resource Laboratory
http://casoilresource.lawr.ucdavis.edu/
University of California at Davis
530.754.7341
2007 Dec 30
1
Bootstrap Confidence Intervals
Hi all.
This is my first post in this forum. Finally I find a forum in the web about
R, although is not in my language.
Now I'm working with Bootstrap CI. I'd like to know how I can calculate a
Bootstrap CI for any statistic, in particular, for Kurtosis Coeficient. I
have done the following code lines:
> library(boot)
> x=rnorm(20)
> kurtosis=function(x) (mean((x-mean(x))^4))/(sd(x)^4)
> z <- numeric(10000)
> for(i in 1:10000)
> z[i]=kurtosis(sample(x, replace=TRUE))
> boot.ci(z, conf = 0.95,type = c("norm","basic"...
2006 Aug 15
1
REML with random slopes and random intercepts giving strange results
Hi everyone,
I have been using REML to derive intercepts and coeficients for each
individual in a growth study. So the code is
m2 <- lmer(change.wt ~ newwt+(newwt|id), data = grow)
Calling coef(model.lmer) gives a matrix with this information which is
what I want. However, as a test I looked at each individual on its own and
used a simple linear regression to obtai...