Question: pls give python code A travel services firm has a paid search campaign. Among the many keywords in its campaign, we have data on four
pls give python code
A travel services firm has a paid search campaign. Among the many keywords in its
campaign, we have data on four keywords, denoted by kw kw kw
and kw These are generic, nonbranded keywords, where the prospect's query does
not indicate that heshe is leaning toward a specific brand. For each keyword, the firm tried
several bid values and recorded the corresponding number of clicks that it received.
The files are named clicksdata.kwcsv clicksdata.kwcsv
clicksdata.kwcsv clicksdata.kwcsv respectively.
Part A: Estimate the alpha and beta parameters for each of these four keywords for this firm.
Handin: The eight numbers. No additional writeup required. Hint on checking your answers:
For kw alpha should be between and beta should between and with
a residualsumofsquares of about
To estimate the alpha and beta for a keyword you need to run nonlinear regression nclicks
as a function of bid.value and using the appropriate function form. In R nonlinear
regression using nls and the basic call is something like what is given below.
nlsoutput nlsnclicks ~ alphaexpbetabidvalue
start listalphastarting value of alpha betastarting value of beta
dataname of data frame
In Python you can use the scipy.optimize.curvefit function
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
