similar to: Extracting 'SOME' values from a linear model.

Displaying 20 results from an estimated 20000 matches similar to: "Extracting 'SOME' values from a linear model."

2009 Apr 06
1
Problem with Extracting Fitted Values from fGarch package
Good day everyone, I fitted a GARCH model to a time series and R estimated the model and provide me with the estimates. However, when I tried to extract the fitted values from the estimated model I got the following error message: "Error in .local(object, ...) : object "fit" not found"   I used the following to extract the fitted values fitted_TASI <- fitted(garchFit(~
2010 Nov 29
1
extracting P values from lm model
Hello I am trying to get out of an lm model the fstatistics, however after I run the model I write > names(Model) and the fstatistic does not appear only these. names(Model) [1] "coefficients" "residuals" "effects" "rank" "fitted.values" [6] "assign" "qr" "df.residual"
2005 Jun 20
2
Fwd: How to sample from a linear mixed model
Thanks. I wonder if there is a general way of extracting var(u) and var(e), which would be needed to simulate u and e. Clearly, one can get the estimated parameters, but is there a clever way of 'setting up' the matrices?? Best S??ren On 6/19/05, S??ren H??jsgaard <Soren.Hojsgaard at agrsci.dk> wrote: > I would like to draw a sample from a linear mixed model y=Xb+Zu+e which has
2011 Aug 24
0
Extracting and using fitted values and residuals with missing data
Hi folks, I've a basic question concerning missing data. I'm running mixed effects analyses using nlme. I've a sizable chunk of missing data on the outcome being modeled, and am using "na.action=na.omit" when running the models. After fitting the models, I'm then trying to extract and use the fitted values and/or residuals for additional analysis, but keep hitting
2006 Jan 12
2
extract variables from linear model
Hi, I fitted a linear model: fit <- lm(y ~ a * b + c - 1 , na.action='na.omit') Now I want to extract only the a * b effects with confidence intervals. Of course, I can just add the coefficients by hand, but I think there should an easier way. I tried with predict.lm using the 'terms' argument, but I didn't manage to do it. Any hints are appreciated, best, joerg
2008 Apr 25
2
Extracting coefficients' standard errors from linear model
Dear all, Hope this question is not too trivial... In order to correct standard errors from an estimation of a fixed effects regression model y need to extract the vector of standard errors of the coefficients of a simple linear model estimated using lm(var1~var2+var3+var4) Unfortunately I can't find out the corresponding function. Thank you very much for your help. Uli -- Uli
2011 Jan 24
2
Linear mixed model: question about t-values
Dear all, I have a question about the output of linear mixed model fitted in R using nlme package. In particular, what are the t-values that are given in an output, how are they calculated and based on what test? I guess it cannot be a simple Student t-test, otherwise how can the simple Student t-test test for significance of interactions, right? I cannot find this information in any of R help
2005 Feb 17
2
Extracting values from linear models
Hello: I want to use values from the output of linear models done using permuted data to construct a random distribution. The problem I am having is the extraction of a value, say the p-value or the regression coefficient, from the summary of a linear model. When summarizing a linear model I get this: Call: lm(formula = fitness ~ mm) Residuals: Min 1Q Median 3Q Max
2005 Jun 17
3
Fit values for NA's in linear regression
Hi, To obtain estimates for some missing values in my data I fitted a linear regression and then used the command fitted(model) to get the fitted values from the model, but R doesn't return any values for the NA's. I can calculate the fitted values from the estimates obtained from the summary of model, but that's not very handy. Is there a way to include the missing values in the
2013 Apr 03
1
linear model coefficients by year and industry, fitted values, residuals, panel data
Hi R-helpers, My real data is a panel (unbalanced and with gaps in years) of thousands of firms, by year and industry, and with financial information (variables X, Y, Z, for example), the number of firms by year and industry is not always equal, the number of years by industry is not always equal. #reproducible example firm1<-sort(rep(1:10,5),decreasing=F) year1<-rep(2000:2004,10)
2013 Jan 15
1
How to get F values for a Generalized Linear Model?
Dear All,   I have fitted generalized linear models with the glm() function from the package lme4. The statistical values it returns are the z-value and the p-value. Now I am searching for a way to get the F-values for my models  to use for reporting - as to my knowledge reporting z-values is not very useful and the F-values together with the p-values would be desired for the report. I tried the
2009 Aug 08
1
linear model: Test difference between coefficients and given values (t.test?)
Hi there, I've got a question which is really trivial for sure but still I have to ask as I'm not making any progress solving it by myself (please be patient with an undergraduate student): I've got a linear model (lm and lmer fitted with method="ML"). Now I want to compare the coefficients (slope, intercept, not the random effects) of both models with a given value (e.g.
2011 Jan 19
1
Quantile Regression: Extracting Residuals
Dear R users Is there a way to obtain the residuals from a model fitted by quantile regression? Thank you. Thanaset -- View this message in context: http://r.789695.n4.nabble.com/Quantile-Regression-Extracting-Residuals-tp3225423p3225423.html Sent from the R help mailing list archive at Nabble.com.
2011 Jun 04
0
Predicted values based on fixed effects do not correspond with actual data in cross-classified generalized linear mixed model (lmer)
Dear R-Users, I have fitted a cross-classified generalized linear mixed model using the lmer package with the following code. Mod<-lmer(y~x+(1|a)+(1|b)+ (1|c), family=binomial) In this case, only including a covariate (x) as a fixed effect. The fitted values, using fitted(mod), correspond to the raw data nicely, and the mean of the fitted values is equal to the mean of the raw data. In
2012 Nov 04
1
Apply same linear model to subset of dataframe
I have applied the same linear model to several different subsets of a dataset. I recently read that in R, code should never be repeated. I feel my code as it currently stands has a lot of repetition, which could be condensed into fewer lines. I will use the mtcars dataset to replicate what I have done. My question is: how can I use fewer lines of code (for example using a for loop, a function or
2009 Oct 21
1
How to find the interception point of two linear fitted model in R?
Dear All, Let have 10 pair of observations, as shown below. ###################### x <- 1:10 y <- c(1,3,2,4,5,10,13,15,19,22) plot(x,y) ###################### Two fitted? models, with ranges of [1,5] and [5,10],?can be easily fitted separately by lm function as shown below: ####################### mod1 <- lm(y[1:5] ~ x[1:5]) mod2 <- lm(y[5:10] ~ x[5:10]) #######################
2004 Nov 04
2
Plotting a linear model object with R 2.0 for Mac OS X
I'm using R for Mac OS X Aqua GUI version 2.0 When using plot() with a linear model object, the plot of the LSR line does not appear. I get the residual plots, the Normal Q-Q plots and Cook's Differnce plot, just not the first plot with the fitted line. I just get an empty Quartz window, with no graph displayed. I've even tried to use plot.lm() and plotting a glm object, but I get the
2011 Feb 24
1
parallel bootstrap linear model on multicore mac (re-post)
Hello all, I am re-posting my previous question with a simpler, more transparent, commented code. I have been ramming my head against this problem, and I wondered if anyone could lend a hand. I want to make parallel a bootstrap of a linear mixed model on my 8-core mac. Below is the process that I want to make parallel (namely, the boot.out<-boot(dat.res,boot.fun, R = nboot) command).
2010 Feb 24
0
Extracting individual parameter estimates from mmlcr
I am new to mmlcr and am working on a latent class mixture model attempting to identify the trajectory and number of classes that best describes my data. I am able to find model parameters such as degrees of freedom, loglikelihood, and BIC. For example, here is a cubic 3-class model I am using. mmlcr1 <- mmlcr(outer = ~ 1 | ID, components = list(list(formula = Score ~ poly(wave,3), class =
2010 Jun 09
2
cbind with vectors of different lengths?
Hello R help I have a dataframe, with 71 samples (rows) and 30 variables. I got linear models for some of the variables,? and I want to join fitted and residuals of these models to the data frame. Sometimes, these vectors have the same length of the dependant variable, but in a few cases, NA values can be found on my data, and therefore, both fitted and residuals have a few rows less than the