Question
Which of the following R functions is most appropriate
for fitting a linear regression model?Solution
Explanation: The lm() function in R is specifically designed for fitting linear models, including linear regression. This function takes the formula for the dependent and independent variables, along with the dataset, and returns an object containing all the necessary information about the fitted model. For example, using lm(y ~ x, data=dataset) fits a linear regression model to predict y based on x . This makes it an essential tool for statistical modeling and predictive analytics. The lm() function forms the backbone for many analyses in R, enabling data analysts to understand relationships between variables and build models for forecasting or hypothesis testing. Option A: The plot() function creates visualizations but does not perform statistical modeling. Option C: The summary() function provides details about a fitted model, but it doesn’t fit models itself. Option D: The predict() function makes predictions based on a model fitted by lm() but does not perform fitting. Option E: The cor() function calculates correlation between variables, which is useful for analysis but not for fitting models.
Which minister of India has chaired the 9th BRICS Science & Technology Ministers meet?
Who is the Ex-officio Chairman of India's Rajya Sabha?
Which of the following statements are correct in the context of the National Emergency in India?
1. President can issue ordinances on state subje...
Which of the following is correct with reference to Financial Emergency under Article 360?Â
The part in Indian Constitution, which contains the Fundamental rights, is
Which of the following states have been the former union territories?
1. Himachal Pradesh
2. Manipur
3. Haryana
4. Tripura
Which of the following Article is known as ‘The very soul of the Constitution’ by Dr.B.R.Ambedkar?
Anti-Deflection law was described in
Match the Following Articles of Indian Constitution to their respective Descriptions.
(i) Article 45 (A) Separation of Judiciary from Executive ...
Consider the following statements about the Central Zoo Authority:
1. It is a statutory body under the Ministry of Environment, Forest & Climate ...