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 3805604
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T14:42:15+00:00 2026-05-19T14:42:15+00:00

I am analyzing data from a wind turbine, normally this is the sort of

  • 0

I am analyzing data from a wind turbine, normally this is the sort of thing I would do in excel but the quantity of data requires something heavy-duty. I have never used R before and so I am just looking for some pointers.

The data consists of 2 columns WindSpeed and Power, so far I have arrived at importing the data from a CSV file and scatter-plotted the two against each other.

What I would like to do next is to sort the data into ranges; for example all data where WindSpeed is between x and y and then find the average of power generated for each range and graph the curve formed.

From this average I want recalculate the average based on data which falls within one of two standard deviations of the average (basically ignoring outliers).

Any pointers are appreciated.

For those who are interested I am trying to create a graph similar to this. Its a pretty standard type of graph but like I said the shear quantity of data requires something heavier than excel.

  • 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-05-19T14:42:16+00:00Added an answer on May 19, 2026 at 2:42 pm

    Throw this version, similar in motivation as @hadley’s, into the mix using an additive model with an adaptive smoother using package mgcv:

    Dummy data first, as used by @hadley

    w_sp <- sample(seq(0, 100, 0.01), 1000)
    power <- 1/(1+exp(-(w_sp -40)/5)) + rnorm(1000, sd = 0.1)
    df <- data.frame(power = power, w_sp = w_sp)
    

    Fit the additive model using gam(), using an adaptive smoother and smoothness selection via REML

    require(mgcv)
    mod <- gam(power ~ s(w_sp, bs = "ad", k = 20), data = df, method = "REML")
    summary(mod)
    

    Predict from our model and get standard errors of fit, use latter to generate an approximate 95% confidence interval

    x_grid <- with(df, data.frame(w_sp = seq(min(w_sp), max(w_sp), length = 100)))
    pred <- predict(mod, x_grid, se.fit = TRUE)
    x_grid <- within(x_grid, fit <- pred$fit)
    x_grid <- within(x_grid, upr <- fit + 2 * pred$se.fit)
    x_grid <- within(x_grid, lwr <- fit - 2 * pred$se.fit)
    

    Plot everything and the Loess fit for comparison

    plot(power ~ w_sp, data = df, col = "grey")
    lines(fit ~ w_sp, data = x_grid, col = "red", lwd = 3)
    ## upper and lower confidence intervals ~95%
    lines(upr ~ w_sp, data = x_grid, col = "red", lwd = 2, lty = "dashed")
    lines(lwr ~ w_sp, data = x_grid, col = "red", lwd = 2, lty = "dashed")
    ## add loess fit from @hadley's answer
    lines(x_grid$w_sp, predict(loess(power ~ w_sp, data = df), x_grid), col = "blue",
          lwd = 3)
    

    adaptive smooth and loess fits

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

Sidebar

Related Questions

I am working on a community detection algorithm for analyzing social network data from
I'm analyzing music mp3 files. What I'm doing is extracting the audio data from
I would like to take data from the Facebook Graph API and analyze it
I've been analyzing a WPF application which basically fetch data from a server and
I'm having difficulties displaying data in a UITextView in iPhone programming. I'm analyzing incoming
I'm analyzing data based on x consecutive working days, M-F (and later skipping selected
I am analyzing a .dmp file that was created and I have a call
I assume that most of the analyzing and tracking is done based on the
Can somebody suggest a good free tool for analyzing .Net memory dumps other than
Does Ruby have any tools along the lines of pylint for analyzing source code

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.