R语言代做编程辅导STATG/M003 STATISTICAL COMPUTING | IN-COURSE ASSESSMENT 2(附答案)

Your solutions should be your own work and are to be handed in by yourself to the Statistical Science Departmental office

Declaration: I am aware of the UCL Statistical Science Department’s regulations on plagiarism for assessed coursework.

LE PHUONG撰写

The file lungfunction.dat contains data from 50 people. Lung function can be measured by a forced out breath of air into a device called a spirometer and is used as a marker for lung health. 

×

现在提到了代写服务,肯定很多人都不会觉得陌生,就算是国内也是有着专业代写作业的服务行业的,能够为有需求的学生提供很多的帮助,不过其实代写机构在国外会更获得学生的支持,这是因为国外的学校对于平时的作业要求比较严格,为了获得更高的分数顺利毕业,不少留学生就会让代写机构帮忙完成作业,比较常见的作业代写类型,就是计算机专业了,因为对于留学生来说这个技术对于Machine Learning或者AI的代码编程要求更高,所以找代写机构完成作业会简单轻松很多,那么代写机构的水平,要怎么选择才会比较高?

1、代写机构正规专业

不论是在什么情况下,选择正规合法经营的机构肯定是首要的操作,这也是为了避免自己在找机构的时候,出现上当受骗的现象,造成自己的经济出现损失,带来的影响还是非常大的,所以需要注意很多细节才可以,所以在这样的情况下,代写机构的选择,也要选择在经营方面属于正规合法的类型,这样才可以保证服务进行的时候,不会出现各种问题,也可以减少损失的出现,而且正规合法也是代写机构的合格基础。

2、代写机构编程能力

作业的难度相信很多人都很熟悉,特别是对于AI深度学习或者是人工神经网络这种算法来说,因为要对SVM、Design Tree、线性回归以及编程有很高的要求,可以说作业的完成要求非常高,因此才会带动代写机构的发展,找专业的代写机构,一般都是会有专业的人员帮忙进行作业的完成,因为这类型的作业对专业要求比较高,因此代写机构也要具备专业能力才可以,否则很容易导致作业的完成出现问题,出现低分的评价。

3、代写机构收费情况

现在有非常多的留学生,都很在意作业的完成度,为了保证作业可以顺利的被完成,要进行的相关操作可是非常多的,代写机构也是因为如此才会延伸出来的,在现在发展也很迅速,现在选择代写机构的时候,一定要重视收费情况的合理性,因为代写作业还是比较费精力的,而且对于专业能力要求也高,所以价格方面一般会收取几千元至万元左右的价格,但是比较简单的也只需要几百元价格。

4、代写机构完成速度

大部分人都很在意代写机构的专业能力,也会很关心要具备什么能力,才可以展现出稳定的代写能力,其实专业的代写机构,对于作业完成度、作业完成时间、作业专业性等方面,都是要有一定的能力的,特别是在完成的时间上,一定要做到可以根据客户规定的时间内完成的操作,才可以作为合格专业的代写机构存在,大众在选择的时候,也可以重视完成时间这一点来。

现在找专业的CS代写机构帮忙完成作业的代写,完全不是奇怪的事情了,而且专业性越强的作业,需要代写机构帮忙的几率就会越高,代写就发展很好,需求量还是非常高的,这也可以很好的说明了,这个专业的难度以及专业性要求,才可以增加代写机构的存在。



There are four quantitative variables: forced expiratory volume in 1 second (FEV1) measurement (to be denoted by fev and measured in

  1. litres), the person’s height in metres (to be denoted by height), age in years (to be denoted by age) and average time spent exercising in hours per week (to be denoted by exercise). In addition there is a variable indicating if the person has used an inhaler (to be denoted inhaler) within the last 24 hours (1=no, 2=yes). Clinicians are interested in how a person’s lung health depends on height, age, exercise and inhaler usage

(a) Download the file lungfunction.dat from the G3 Moodle page. Read the
data into R using read.table and then name the columns as fev, height,
inhaler, age, exercise.
(b) Obtain summary statistics for each quantitative variable and make useful plots of the data | i.e., that are relevant to the objectives of the study. Such plots may include, but are not necessarily restricted to, pairwise scatter plots with different plotting symbols for those who have or haven’t used an inhaler
recently. Put plots together in a single figure where appropriate and consider possibly using log scales for the quantitative variables.
(c) Find a linear model that enables fev to be predicted from the other variables and that is not more complicated than necessary. You may wish to consider
using log transformations of one or more of the explanatory variables. All your models should be fitted using the lm function, and wide range of models
should be considered to make your choice of model convincing with the use
appropriate diagnostics to assess them. Ultimately you are required to
recommend a single model that is suitable for interpretation and to justify
your recommendation.
(d) Write a brief report on your analysis in three sections:

I Describe briefly what you found in your exploratory analysis in part (a)

II Describe briefly (without too many technical details) what models you considered in part (b) and why you chose the model you did, and III State your final model clearly and describe it in words. Remember to include an estimate of the error standard deviation and say what this means. Give an estimate of what would be the effect on the average FEV1 by being older (e.g, by 1 year of age). Give an appropriate assessment of the uncertainty in your estimate


python岭回归、Lasso、随机森林、XGBoost、Keras神经网络、kmeans聚类链家租房数据地理可视化分析

阅读文章


  1. The file trnormal.dat contains observations from a truncated normal distribution.
    Each observation was originally drawn from a normal N(µ; σ2) distribution, and
    any values less than u are replaced as u. In this instance, u is taken to be 1.
    So if X ∼ N(µ; σ2) then the observations are from the distribution of
    W = max(u; X) where u = 1. Hence:
image.png

and


随时关注您喜欢的主题


image.png

The log-likelihood of µ and σ given a set of observations w1; : : : wn is

image.png

The function I(C) is the indicator function, taking the value 1 if the condition C is
true and 0 if the condition C is false.
(a) Download the data trnormal.dat from the G3 Moodle page. Read it into R
using scan.
(b) Obtain summary statistics for the data and plot a histogram.
(c) Write a function called negll that takes two arguments
(i) params, a vector containing the values of the two parameters (µ; σ), and
(ii) dat, a vector w of the data,
and returns the negative log-likelihood, -l(µ; σjw). (Hint R functions pnorm
and dnorm maybe useful in computing the negative log-likelihood.)
(d) Use your function negll to evaluate and print out the negative log-likelihood
for the data in trnormal.dat for a few sensible values of µ and σ.
(e) Use the R function nlm to find and print out the maximum likelihood
estimates of µ and σ for the data in trnormal.dat by minimising the negative
log likelihood.
(f) Obtain and print out approximate standard errors for these estimates.


#1

colnames(data)=c("fev", "height","inhaler", "age", "exercise")#给列名赋值
summary(data)
cor(data)#查看各个变量之间的关系
plot(data)
attach(data)#绑定数据

boxplot(fev ~ inhaler,
          col = "yellow",
         main = "inhaler与fev箱线图",
         xlab = "inhaler",
         ylab = "fev",
         xlim = c(0, 3), ylim = c(5, 9), yaxs = "i")
boxplot(fev ~ height,
        
          col = "red",
          summary(lm1)
#使用向前向后线性拟合剔除无关变量
lm2=step(lm1,direction="both")
summary(lm2)
#对变量进行log变换
lm3=lm(fev~height+inhaler+age+log(inhaler),data=data)



#2

#用几个参数进行测试
l=negll(c(1,1),data)
l=negll(c(2,2),data)
l=negll(c(1,3),data)
#用极大似然法估计negll函数的参数
lm1模型概要.png
lm2模型概要.png
lm3模型概要.png
lm4模型概要.png
lm5模型概要.png
变量关系.png
变量关系图.png
散点图1.png
散点图2.png
散点图3.png
数据概览.png
箱线图1.png
箱线图2.png
箱线图3.png
箱线图4.png

关于分析师

在此对LE PHUONG对本文所作的贡献表示诚挚感谢,她在山东大学完成了计算机科学与技术专业的硕士学位,专注数据分析、数据可视化、数据采集等。擅长Python、SQL、C/C++、HTML、CSS、VSCode、Linux、Jupyter Notebook。

 
QQ在线咨询
售前咨询热线
15121130882
售后咨询热线
0571-63341498

关注有关新文章的微信公众号


永远不要错过任何见解。当新文章发表时,我们会通过微信公众号向您推送。

技术干货

最新洞察

This will close in 0 seconds