Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8892101
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T22:54:35+00:00 2026-06-14T22:54:35+00:00

I recently came across the R-package beanplot and the offered possibility to plot the

  • 0

I recently came across the R-package beanplot and the offered possibility to plot the distribution of two subgroups in one single plot (special asymmetric beanplot). You find a description of the package in the Journal of Statistical Software and on the cran.r-project.org.

I produced an asymmetric beanplot using the following CODE:

library(psych) 
library(beanplot)

var1 <-c(20,33,NA,39,NA,40,34,33,NA,38,NA,8,7,NA,NA,40,34,24,25,36,40,37,34,NA,35)
var2 <- c(1,0,1,1,1,0,1,0,1,NA,1,0,0,0,0,1,1,0,1,0,1,1,NA,0,1)
mydata<-data.frame(var1,var2) 
table(mydata)

par(lend = 1, mai = c(0.8, 0.8, 0.5, 0.5))
beanplot(var1 ~ var2, data= mydata,  side = "both",log="", 
what=c(1,1,1,0), border = NA, col = list("black", c("grey", "white")))
legend("bottomleft", fill =c("black", "grey"), legend = c("no", "yes"))

The produced plot nicely shows the different shape of the two subgroups’ distribution.

Asymmetric beanplot

PROBLEM

The dependent variable is measured on a scale ranging from 7 to 40. However, the y-axis appears to go from -1 to +55.

It would be great if anyone could explain how the scale is modified, i.e. what is actually plotted here. Is there a way to plot the distribution by using the original scale?

Many many thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T22:54:35+00:00Added an answer on June 14, 2026 at 10:54 pm

    beanplot uses density. The estimated density can give mass to areas past the range of the observed data. You could try this to get an idea of what density does – plot(density(1:2))and you should see that it’s just taking an average of gaussian densities centered at the data points (note that you can use a different kernel as beanplot does allow you to specify a kernel parameter). How it chooses the variance for that gaussian is up to you but by default it looks like beanplot uses bw.SJ with the “dpi” method to choose the bandwidth.

    You could use the cutmin and cutmax to control the range that beanplot actually plots over but this doesn’t actually change the density estimate.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I recently came across Linsched where one can simulate in user-space some of the
I am learning Java recently, and I came across the notion of package-private classes,
I recently came across one of Google's projects What do you love and saw
I recently came across a way to develop pluggable application modules when using ASP.NET
i recently came across an exciting jquery plugin for image overlays http://jobyj.in/adipoli/ it says
I recently came across this line in a PHP script: $_REQUEST['start_date']=$date; Is it allowed
I recently came across the following piece of code. It doesn't look valid because
I recently came across this article , discussing how to leverage mod_cluster to create
I recently came across a great data structures book, Data Structures Using C (c)
I recently came across Erlang, the programming language, and I've become interested in developing

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.