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.
When was the Ujjwala Yojana launched, and which ministry oversees it?
Which of the following countries share a border with ‘Greece’?
1.North MacedoniaÂ
2.Bulgaria
3.AlbaniaÂ
4.Turkey
<...Changu dance is a famous folk dance of which of the following states?
Which of the following statements is/are correct regarding ‘Gabon’?
How much budget is allocated to Norway's support for India's 'Hunger Project' in Uttarakhand?Â
Who is chairing the High-Level Committee of Experts formed by the Ministry of Education to oversee the conduct of examinations?
What is the botanical name for Ringal, a material utilized in Uttarakhand's handicraft industry?
Consumer Protection Act, 2019 has replaced which of the following?
Which Indian state government has launched the Mukhyamantri Seekho-Kamao Yojana to empower the youth?
Which of the following two places is connected by 'Shringkanth Pass'?