Find Jobs
Hire Freelancers

Fix my code in R for a bass diffusion model

$30-250 USD

Closed
Posted over 5 years ago

$30-250 USD

Paid on delivery
Hi, I would like someone to have a look over my code and fix it, so that I can calculate the correct parameters m, q, and p based on my real-life sales data. Here is the code: [login to view URL] <-c(0.376000,0.937000,4.416000,22.497000,39.409000,51.630000,54.828000,54.132000,50.315000,42.628000,35.165000,26.379000,14.377000) Sales <- diff([login to view URL]) sales <- [login to view URL][-1] sales2 <- sales*sales l <- length(Sales) # T <- 1:l # T = [1,2,3,4,5,6,7,8,9,10,11,12,13] # Bass GA bassf <- function(x,theta) theta[1] * ( ((theta[2]+theta[3])^2 / theta[2]) * exp(-(theta[2]+theta[3]) * T) ) /(1+(theta[3]/theta[2])*exp(-(theta[2]+theta[3])*x))^2 # f(t) fitnessL <- function(theta,x,y) -sum((y-bassf(x,theta))^2) library(GA) maxiter=500 GA3 <- ga(type="real-valued",fitness=fitnessL,x=T,y=Sales,lower=c(0,0,0),upper=c(9999999999,1,1),popSize=500,crossover=gareal_blxCrossover,maxiter=500,run=200,names=c("m","p","q")) summary(GA3) bassf <- function(x,theta) theta[1] * ( ((theta[2]+theta[3])^2 / theta[2]) * exp(-(theta[2]+theta[3])* x) ) /(1+(theta[3]/theta[2])*exp(-(theta[2]+theta[3])*x))^2 theta <- GA3@solution salesfit <- bassf(0:15,theta) salesfit Total_customer <-cumsum(salesfit) Total_customer plot(Total_customer,type="l") When running the code in R, I always get a value for M that is not possible based on the assumptions of the bass model. In the end I also want to plot the bass model function and show the development from year 2002 (start date of the sales data) to the end of the sales data 2014 and forecast until 2020. The data is in pcs sold millions. Please dont hesitate if you have further questions
Project ID: 17983331

About the project

6 proposals
Remote project
Active 5 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs
6 freelancers are bidding on average $181 USD for this job
User Avatar
I'm an Engineer in Statistics and Applied Economics, i've got many skills and expertise that will allow me achieving perfectly all the projects and assignments because my priority is your satisfaction I am a master of softwares like SPSS, SAS, STATA, R, Eviews, Minitab, MS excel I have advanced knowledges in: Econometrics: Panel Data, Pooled Data, cross-section Data, Probit, Logit, Multinomial Logit, scoring, Economics modeling, Tobit, Heckman.. ---Data Mining: Factor analysis, Principal Component Analysis, Regression (Simple, Multiple, logisitic, hierarchical, Poisson), PCA, PCA, Data Quality, Data Reliability, ANOVA, ANOM, ANCOVA, Clustering, Hierarchical Clustering and bayesian analysis I'll provide you perfect reporting using MsWord. At the same time i can help you to do any statistics related Reports Presentations Homework Tutorials Questionnaires
$200 USD in 3 days
4.9 (146 reviews)
6.5
6.5
User Avatar
This is Vibrant Webtech and I was glad to see that you're looking for help for project Fix my code in R for a bass diffusion model. I've delivered more than 400 + projects in the last 5 years and this makes me very confident with your task.I'd like to have more details before proceeding. This way I'll have the chance to elaborate m bid accordingly. I never ask for payments in front. I will only ask you to release the agreed milestones once the task for each one of them is met and you're happy with it. Feel free to visit my personal page on this platform and get an idea of how satisfied my clients are from my work. Don't hesitate to contact me. I'm looking forward to hearing from you soon.I have more than 5 year of experience in Coding, Mathematics, Programming, Statistical Analysis, Statistics. Please ping me for more discussion.
$250 USD in 4 days
4.9 (36 reviews)
6.1
6.1
User Avatar
Dear employer. I am Jin.S, developer . I've just read your job post and I'm very interested. I'm a certificated freelancer with almost 1100 good reviews from clients. I m quite experienced in Mathematics, Programming, Statistical Analysis, Statistics. Thanks.
$155 USD in 3 days
4.7 (23 reviews)
5.6
5.6
User Avatar
I am an expert in R programming check my reviews award me and I will do my best.......................................................................................................................................................................................................
$31 USD in 3 days
4.8 (8 reviews)
3.8
3.8
User Avatar
⭐⭐⭐⭐⭐⭐hello i can finish your project in short time⭐⭐⭐⭐⭐⭐ This is my profile::https://www.freelancer.com/u/bengalTIGER1106 i am new freelancer but my speed is rocket speed so i can help your project beautiful and perfectly in shortime I read your requirements. I am expert in algorism so I think to help your project I have a good skills for implements your project. I will do best possible to provide perfect results. Just say the word and i will take care of it ⭐⭐⭐⭐⭐⭐Thanks .⭐⭐⭐⭐⭐⭐
$300 USD in 1 day
0.0 (0 reviews)
0.0
0.0

About the client

Flag of GERMANY
OSTHOFEN, Germany
3.9
11
Payment method verified
Member since Sep 20, 2015

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.