similar to: plotting lm coeficients with their means

Displaying 20 results from an estimated 1400 matches similar to: "plotting lm coeficients with their means"

2013 Apr 04
5
Help for bootstrapping‏
I have a set of data for US t-bill returns and US stock returns frm 1980-2012. I am trying to bootstrap the data and obtain the minimum variance portfolio and repeat this portfolio 1000 times. However I am unable to get the correct code function for the minimum variance portfolio. When I tried to enter Opt(OriData+1, 1, 5, 0), I get "error:subscript out of bounds" Please help!
2010 Dec 07
1
Help on loops
Dear R-helpers, I have a basic question on using loops. I have a panel data set with different variables measured for "n" firms over "t" time periods. A snapshot of the data is given below id    t    X1    X2 1    1     4    3 1    2    9    2 1    3    7    3 1    4    6    6 2    1    6    4 2    2    5    3 2    3    1    1 3    1    9    6 3    2    5    5 thus total
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",
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
1998 Oct 16
3
mean and sd of each serial position
I want to do something like this in R. If I have three vectors > a1 [1] 1 2 3 > a2 [1] 4 5 6 > a3 [1] 9 10 7 I want to compute 1. A vector that is the mean at each serial position of a1, a2, and a3. so in this example it would have the contents 4.667, 5.667, 5.333333 2. A vector that is the SD at each serial position of a1, a2, and a3. so in this example it would have the contents
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
2006 Mar 23
3
Sampling in R
Hi all! I was wondering if you can help me with a little sampling issue I'm having in R. I have a database with 100 observations. I need to sample n=9 sample size, 200 times (i.e. get 200 samples of size 9). N (pop. size) =100 Each sample can't contain the same observation more than one time (i.e. the program needs to check if the obs. has already been sampled into the sample -
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
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
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
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
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
2004 Dec 06
1
plot color question
Thanks again Andy and Uwe for you help on my previous post of ploting lm coef and means. With your direction, I was able to expand and generalize the function to meet my requirements. Follow up question: Is it possible to make the points different colors depending on which quaderant they fall into? The data frame contains two variables (x and y) Quad 1 = x>mean(x) & y>mean(y) would
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:
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