similar to: One rather theoretical question about fitting algorithm

Displaying 20 results from an estimated 800 matches similar to: "One rather theoretical question about fitting algorithm"

2017 Dec 06
2
Coeficients estimation in a repeated measures linear model
Dear Users, I am trying to understand the inner workings of a repeated measures linear model. Take for example a situation with 6 individuals sampled twice for two conditions (control and treated). set.seed(12) ctrl <- rnorm(n = 6, mean = 2) ttd <- rnorm(n = 6, mean = 10) dat <- data.frame(vals = c(ctrl, ttd), group = c(rep("ctrl", 6), rep("ttd",
2004 Dec 29
3
gls model and matrix operations
Dear List: I am estimating a gls model and am having to make some rather unconventional modifications to handle a particular problem I have identified. My aim is to fit a GLS with an AR1 structure, obtain the variance-covariance matrix (V), modify it as needed given my research problem, and then reestimate the GLS by brute force using matrix operations. All seems to be working almost perfectly,
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))
2006 Jan 24
3
R-help Digest, Vol 35, Issue 24
Dear Prof Ripley, First of all, unless you are an english professor, then I do not think you have any business policing language. I'm still very much a student, both in R, and regarding signal analysis. My competence on the subject as compared too your own level of expertise, or my spelling for that matter, may be a contension for you, but it would have been better had you kept that opinion
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 your time! R. [[alternative HTML version
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)))
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, effectA_2) = 0 and the same for factor B. Is
2005 May 25
1
[Fwd: Re: [Fwd: failure delivery]]
I appear to have hit one of the "drop" issues raised in some discussions a couple of years ago by Frank Harrell. They don't seem to have been fixed, and I'm under some pressure to get a quick solution for a forecasting task I'm doing. I have been modelling some retail sales data, and the days just after Thanksgiving (US version!) are important. So I created some dummy
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 function that is
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
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
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
2010 May 28
1
latex.rms and models fit with GLS
Hi, I have fit a model using the rms package with the Gls() function. Is there a way to get the model estimates, std errors, and p-values (i.e. what you get with print(fit)) into latex format? I have tried: f <- Gls(...) latex(f, file='') ... but I get the following error Error in replace.substring.wild(s, old, new, test = test, front = front, : does not handle > 1 * in
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 obtain the same information, then
2005 Jan 20
3
Constructing Matrices
Dear List: I am working to construct a matrix of a particular form. For the most part, developing the matrix is simple and is built as follows: vl.mat<-matrix(c(0,0,0,0,0,64,0,0,0,0,64,0,0,0,0,64),nc=4) Now to expand this matrix to be block-diagonal, I do the following: sample.size <- 100 # number of individual students I<- diag(sample.size) bd.mat<-kronecker(I,vl.mat) This
2007 Jul 15
1
NNET re-building the model
Hello, I've been working with "nnet" and now I'd like to use the weigths, from the fitted model, to iterpret some of variables impornatce. I used the following command: mts <- nnet(y=Y,x=X,size =4, rang = 0.1, decay = 5e-4, maxit = 5000,linout=TRUE) X is (m x n) Y is (m x 1) And then I get the coeficients by: Wts<-coef(mts) b->h1 i1->h1
2008 Feb 13
1
use of poly()
Hi, I am curious about how to interpret the results of a polynomial regression-- using poly(raw=TRUE) vs. poly(raw=FALSE). set.seed(123456) x <- rnorm(100) y <- jitter(1*x + 2*x^2 + 3*x^3 , 250) plot(y ~ x) l.poly <- lm(y ~ poly(x, 3)) l.poly.raw <- lm(y ~ poly(x, 3, raw=TRUE)) s <- seq(-3, 3, by=0.1) lines(s, predict(l.poly, data.frame(x=s)), col=1) lines(s,
2002 Nov 29
2
Obtaining the variable names of a glm object
Is names(model1$coef) what you're looking for? -----Original Message----- From: Kenneth Cabrera [mailto:krcabrer at epm.net.co] Sent: 29 November 2002 10:36 Cc: R-help at stat.math.ethz.ch Subject: [R] Obtaining the variable names of a glm object Hi, R users! Suppose I make a model like this:
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
2006 Aug 16
1
[SPAM] - RE: REML with random slopes and random intercepts giving strange results - Bayesian Filter detected spam
Can you provide the summary(m2) results? > -----Original Message----- > From: Simon Pickett [mailto:S.Pickett at exeter.ac.uk] > Sent: Wednesday, August 16, 2006 7:14 AM > To: Doran, Harold > Cc: r-help at stat.math.ethz.ch > Subject: [SPAM] - RE: [R] REML with random slopes and random > intercepts giving strange results - Bayesian Filter detected spam > > Hi again,