Discussion Overview
The discussion focuses on the proper usage of the nlm function in R for minimizing functions, particularly addressing how to handle multiple variables in the function being minimized. Participants explore the correct structure of the function and the input parameters required for nlm to work effectively.
Discussion Character
- Technical explanation
- Debate/contested
- Homework-related
Main Points Raised
- One participant shares an initial attempt to minimize a function with two variables using nlm but only receives an estimate for one variable, questioning how to obtain estimates for both x and y.
- Another participant suggests that the parameter p must be an array rather than a single number, indicating a misunderstanding of how nlm operates with multiple variables.
- A similar point is reiterated by another participant, emphasizing that the independent input values of the function must match the dimensions of p.
- A different participant critiques the initial code, stating that the function is incorrectly defined for nlm and provides a corrected version that uses an array for the function's input.
Areas of Agreement / Disagreement
Participants express differing views on the correct implementation of the nlm function, with no consensus reached on the best approach to define the function and its parameters.
Contextual Notes
There are unresolved aspects regarding the proper structure of the function and the handling of multiple variables, as well as the specific requirements for input parameters in nlm.