68 questions
0
votes
1
answer
100
views
Create coefficient plot with 90 and 95% CIs overlayed in ggplot
I have some output from regression models where I've saved the coefficient, SE, and CI values.
I want to additionally calculate the 90% CI upper and lower values, and then basically plot that 90% CI ...
0
votes
1
answer
184
views
Coefplot.gllvm shows different plots per categorical factor level rather than each factor
I'm not well versed in R but am using the GLLVM package to assess the influence of season and water mass on plankton distribution - when I try to make the coefficient plots using coeffplot.gllvm() I ...
1
vote
0
answers
60
views
How to remove the year of event from TWFE coefficient plots in STATA?
I want to remove the year of the event from the coefficient plots of my event study. In my setting there are variation in treatment timing, with a treatment unit which is a county can be treated at ...
0
votes
1
answer
96
views
How to plot coefficients from glmnet multinomial object using coefplot() in r?
I am trying to visualise coefficient estimates, produced by a glmnet multinomial model, using coefplot. I know, at least, the implementation of coefplot in Stata supports plotting multinomial model ...
0
votes
1
answer
355
views
fixest::coefplot problem using 'keep' and 'x' to rename variables ('Argument 'x' must have the same length as the number of coefficients')
I'm using fixest::coefplot() to plot the coefficients of a regression (with fixed effects) , but I keep having the same problem when trying to use both "keep" and "x".
The error I ...
0
votes
1
answer
2k
views
Event Study from DID regression using coefplot
I am trying to create a event study plot that give me yearly average treatment effects on the treated on a business law on the average number of property firms relative to a control state where the ...
1
vote
0
answers
82
views
Altair forestplot how to vertically offset errorbars
I want to create a forestplot (aka coefplot) in Altair showing 2 confidence intervals per variable, but not having them overlap.
I got as far as the example below, but I really want to move the ...
1
vote
1
answer
173
views
Create a coefplot from matrix
I am trying to create a coefplot (https://lrberge.github.io/fixest/reference/coefplot.html) from a matrix. (This is to show linear combinations of interaction terms, see below example code.) The ...
1
vote
2
answers
97
views
Multiple coefplots: loop quotes issue
I'm trying to create a loop in STata that creates coefplots, which show the coefficients for multiple regressions for subgroups of a population. Each of the plots would use different regressors.
I'm ...
0
votes
1
answer
326
views
Coefplot overlaps coefficient estimations
I am trying to fix this plot made with coefplot in Stata.
enter image description here
I tried to estimate foreign trade elasticities using different proxies for relative price. I used conventional ...
0
votes
1
answer
473
views
Coefplot-Graph point estimates and confidence intervals from different regressions
In Stata, I am running the same regression 5 times, with each regression covering a separate time interval. I previously have stored the coefficient of interest after each regression like so:
local ...
0
votes
1
answer
167
views
How to draw significant coefficients against log odds/ Incidence Rate Ratio for negative binomial glmm?
I am trying to run glmm for my data and I have top models for all my target species. However, when I try to plot them with log odds, all the coefficients show up. When I try to select just one ...
0
votes
1
answer
1k
views
How to hard code coefficients in coefplot
I have two 95% confidence intervals I would like to display side by side in one coeff plot in Stata.
The first is just a regression that I run, and I use coefplot to plot the coefficient & its 95% ...
0
votes
2
answers
2k
views
Event study plot
I want to make an event study plot in R. I have a dataset like this in R:
library(tidyverse)
groups <- c("A", "B", "C", "D", "E")
data <- ...
0
votes
1
answer
535
views
How do I get two coefficients from a set of regressions plotted on the same chart?
I am estimating a model in Stata 16 over several subsamples. I want a chart comparing two coefficients of interest over the different subsamples, with axis labels showing which subsample it comes from....
0
votes
1
answer
843
views
How can I adjust a coefplot for the constant value of categorical variable estimation?
I have a dataset in Stata that looks something like this
Variable | Obs Mean Std. dev. Min Max
-------------+---------------------------------------------------------
...
0
votes
1
answer
613
views
Using dwplot to display coefficients by different colors based on some paramaters
I want to create a sjPlot-ish coefficient plot using dwplot() because my model outputs (odds-ratio-lized logit coefs and s.e.) cannot be directly fed into the former. I want the output to display coef ...
0
votes
0
answers
681
views
Coefficient Plot in r for mixed model
I have fitted a three level model looking at political trust using multiple waves of survey data. Individuals nested in country-waves nested in countries. Now that I have my results, I want to present ...
3
votes
1
answer
2k
views
Why does coefplot not plot all levels of interaction in Stata?
I want to plot the coefficients from this regression as a forest plot.
-------------------------------------------------------------------------------
price | Coefficient Std. err. t ...
1
vote
0
answers
598
views
drop() option not working in coefplot package in Stata
In Stata I am trying to only keep specific variables in a coefficient plot, and I am using the drop() option but it is not working well although it is not producing any errors. coefplot is a community-...
1
vote
1
answer
3k
views
How to label y axis in coefplot?
How do I label/rename the variables on y axis?
sysuse auto, clear
regress price mpg trunk length turn if foreign==0
estimates store Option1
regress price mpg trunk length turn if foreign==1
estimates ...
0
votes
1
answer
4k
views
Changing legend text size coefplot
I am working on coefplot and I would like to readjust the legend size of the labels to vsmall. However, when I use labsize(vsmall)). I get an error. Am I missing a specific step within coefplot?
...
1
vote
2
answers
327
views
Separate coefficients from lm() and plot next to each other
I'm running a simple lm() regression that returns 4 coefficients. I would like to plot them two by two (next to each other, with different colours), as if I would have run two models giving two ...
0
votes
0
answers
248
views
Plot separate legends for shape and color with multiplot (coefplot) R
I am trying to plot a graph using multiplot, I function that I do not know really well. I want to set different colours with respect to the time span and different shapes with respect to the type of ...
0
votes
1
answer
2k
views
Coefplot fit next to each other
I am creating three coefficient plots with the same variables and want them to be one next to each other, but the third one does not fit horizontally so it appears under the other two. My code is
...
1
vote
1
answer
433
views
fixest::iplot(), dropping some factors
I am using fixest (version 0.9.0), and I want to omit a numerical factor in the plot of the fixed effects generated by iplot().
library(fixest)
reg1 <- feols(mpg ~ disp + i(carb, ref = 8), data = ...
2
votes
1
answer
1k
views
Edit confidence interval in Stata coefplot
I am using the coefplot command in Stata to plot coefficients and confidence intervals from multiple regression models. I am plotting the same coefficient (X) from 4 different model specifications.
...
0
votes
1
answer
2k
views
Coefplot: change color of bar in the graph in stata
I have multiple regressions and I used the coefplot command to add all of the confidence intervals on one graph with a bar. Is it possible to change the color of the bars to be the same for each ...
1
vote
1
answer
971
views
Plot combining regression coefficients (partial derivatives) with CIs in R, lincom + coefplot or plotbeta?
Most of the time we run a regression with interactive terms, we are interested in a partial derivative. For example, consider the model below,
If I am interested to know the effect of X1 on P(Y), or ...
2
votes
1
answer
951
views
manually order coefficients in coefplot
I would like to manually sort the coefficients in a coefplot. Previous questions only achieve ordering by (decreased) magnitude, which is not what I want.
Consider the below example:
library(coefplot)
...
-1
votes
1
answer
446
views
stata plotting coefficients from loop regression
I am a beginner in Stata and I am trying to create a loop regression, store the coefficients of the DVs and then plot these. Does this code make sense?
forvalues i = 1/100 {
regress y x1 x2 x3 if ID==`...
2
votes
2
answers
758
views
Stata coefplot: plot coefficients and corresponding confidence intervals on 2nd axis
When trying to depict two coefficients from one regression on separate axes with Ben Jann's superb coefplot (ssc install coefplot) command, the coefficient to be shown on the 2nd axis is correctly ...
0
votes
0
answers
146
views
Fitting two coefplot in one graph using par(mfrow()) method
I'm trying to arrange two coefplot objects into one graph via the par(mfrow(,)) method, but it didn't work out. What did I do wrong? Or is that coefplot just doesn't work this way? What will be ...
0
votes
1
answer
906
views
coefplot with rdrobust
In Stata I'm trying to plot the coefficients of rdrobust estimates using coefplot:
foreach depvar of varlist var1 var2 var3 var4 {
rdrobust `depvar' running_variable, kernel(triangular) bwselect(...
1
vote
1
answer
534
views
Plot specific fixed-effect variable with multiple outcomes using coefplot
I run a regression with a fixed-effect that has multiple outcomes. I want to only plot that fixed-effect variable. I don't like the way coefplot does the ticks and labels. Let me give an example.
...
1
vote
0
answers
368
views
How to set title font size in coefplot::coefplot.default()?
Using the library(coefplot), the following code creates a coefficient plot
library(dplyr)
library(coefplot)
set.seed(123)
x1 <- sample(1:8,10000,replace=TRUE)
x2 <- sample(1:6,10000,replace=...
0
votes
1
answer
2k
views
Dropping variables from the coefplot of marginal effects (mlogit)
I want to create a coefficient plot by coefplot on the marginal effects after running a multinomial logistic regression in Stata. What I would like to get help with:
I would like to keep only one ...
3
votes
2
answers
2k
views
change coefficient names in coefplot.glm()
I would like to plot a coefplot.glm() with costumized coefficient names.
Consider the following code:
coefplot::coefplot.glm(lm(rbinom(1000,1,.5) ~ rnorm(1000,50,2) + rbinom(1000,1,prob=0.63) + ...
3
votes
2
answers
2k
views
Is coefplot2 still supported for current version of R version 3.6.1 (2019-07-05) -- "Action of the Toes"
I use coefplot2 to plot regression estimates for ecological data. I have a new computer so just setting up. All other packages and code working for new set-up. But dearly love to keep using coefplot2 ...
0
votes
1
answer
280
views
How to interleave two string vectors with equal signs?
I am trying to interleave two string vectors into a vector of, I believe, quosures with equal signs.
Here is an example:
a <- c('coef_name1', 'coef_name2')
b <- c('clean_name1', 'clean_name2')
...
0
votes
1
answer
2k
views
How to color by coefficient rather than model in R coefplot::multiplot
I am making a coefficient plot with multiple models using coefplot::multiplot in R; the below image is what I currently have.
And this is the code I used to create it:
coefplot::multiplot(sc.mod.env....
0
votes
1
answer
10k
views
How do I plot coefficients for multiple models in one graph using coefplot?
I have models that have different dependent variables (DVs), but using the same instrumental variable (IV), with two different types of identification strategies. In short I have:
Group1
model 1
...
3
votes
2
answers
10k
views
Plot only interaction terms in coefplot
After a regression in Stata, I am trying to plot only the coefficients of the interaction terms.
I was unable to do this using the community-contributed command coefplot.
Here is a reproducible ...
-1
votes
2
answers
480
views
Comparing mean values by group between several variables
I am trying to reproduce a graph from Stata in R. I have several variables and want to display their mean in each treatment group of which there are two. The Stata graph is as follows:
This ...
1
vote
1
answer
60
views
Coefplot for a chi square distribution
I was told to do a coefplot in R to visualise my data better.
Therefore i first did a chi square test. and after i put my data into a table it looked like this:
1 2 3 5 6
...
1
vote
0
answers
223
views
Plotting multilevel model coefficients in R
I am fitting a 2-level model in R using lme4 for a dataset with multiple election surveys. Im using household income by quintile (ordinal, 5 categories) to predict an outcome variable on the ...
4
votes
1
answer
9k
views
How to specify different xscale in coefplot using stata?
I am using coefplot in stata to plot coefficients. I am combining two graphs together and would like to use different xscale. The webpage suggests to use this option:
byopts(xrescale)
However, this ...
1
vote
1
answer
10k
views
Different colors for coefficients in the same model with coefplot
I work with the community-contributed command coefplot to plot regression coefficients for a categorical variable.
My regression model is a simple linear model which has a categorical variable with ...
0
votes
1
answer
552
views
Getting coefplot to use estimate titles or outcome labels
Consider the following toy example using the community-contributed Stata command coefplot:
sysuse auto
reg weight i.foreign
eststo, title("Weight"): margins, eydx(foreign) post
reg price i.foreign
...
3
votes
1
answer
8k
views
Spacing for y-axis labels in coefplot
I am working with the community-contributed command coefplot in Stata.
I have a large number of estimated coefficients, which I would like to plot on the same graph.
As such, I would like to ...